1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 00:20:08 +01:00

Modify the paths of packages to be based on brew prefix

- brew
- dnsmasq
- nginx
- php-fpm
- log
- etc
This commit is contained in:
soilSpoon
2020-11-15 14:38:18 +09:00
parent e64d5d877b
commit 2c06a5d4f0
10 changed files with 39 additions and 39 deletions

View File

@@ -202,7 +202,7 @@ function stopService($services)
*/
function hasLinkedPhp()
{
return $this->files->isLink(PHP_BINARY_PATH);
return $this->files->isLink(BREW_PREFIX.'/bin/php');
}
/**
@@ -216,7 +216,7 @@ function getParsedLinkedPhp()
throw new DomainException("Homebrew PHP appears not to be linked.");
}
$resolvedPath = $this->files->readLink(PHP_BINARY_PATH);
$resolvedPath = $this->files->readLink(BREW_PREFIX.'/bin/php');
/**
* Typical homebrew path resolutions are like:
@@ -283,7 +283,7 @@ function createSudoersEntry()
{
$this->files->ensureDirExists('/etc/sudoers.d');
$this->files->put('/etc/sudoers.d/brew', 'Cmnd_Alias BREW = /usr/local/bin/brew *
$this->files->put('/etc/sudoers.d/brew', 'Cmnd_Alias BREW = '.BREW_PREFIX.'/bin/brew *
%admin ALL=(root) NOPASSWD:SETENV: BREW'.PHP_EOL);
}
@@ -375,7 +375,7 @@ function uninstallAllPhpVersions()
function uninstallFormula($formula)
{
$this->cli->runAsUser('brew uninstall --force '.$formula);
$this->cli->run('rm -rf /usr/local/Cellar/'.$formula);
$this->cli->run('rm -rf '.BREW_PREFIX.'/Cellar/'.$formula);
}
/**