mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 08:40:09 +01:00
fix nginx support
This commit is contained in:
committed by
Adam Wathan
parent
6f61b840f1
commit
fba8eb7602
@@ -50,13 +50,14 @@ function hasInstalledPhp()
|
||||
* Ensure that the given formula is installed.
|
||||
*
|
||||
* @param string $formula
|
||||
* @param array $options
|
||||
* @param array $taps
|
||||
* @return void
|
||||
*/
|
||||
function ensureInstalled($formula, array $taps = [])
|
||||
function ensureInstalled($formula, array $options = [], array $taps = [])
|
||||
{
|
||||
if (! $this->installed($formula)) {
|
||||
$this->installOrFail($formula, $taps);
|
||||
$this->installOrFail($formula, $options, $taps);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,10 +65,11 @@ function ensureInstalled($formula, array $taps = [])
|
||||
* Install the given formula and throw an exception on failure.
|
||||
*
|
||||
* @param string $formula
|
||||
* @param array $options
|
||||
* @param array $taps
|
||||
* @return void
|
||||
*/
|
||||
function installOrFail($formula, array $taps = [])
|
||||
function installOrFail($formula, array $options = [], array $taps = [])
|
||||
{
|
||||
if (count($taps) > 0) {
|
||||
$this->tap($taps);
|
||||
@@ -75,7 +77,7 @@ function installOrFail($formula, array $taps = [])
|
||||
|
||||
output('<info>['.$formula.'] is not installed, installing it now via Brew...</info> 🍻');
|
||||
|
||||
$this->cli->runAsUser('brew install '.$formula, function ($exitCode, $errorOutput) use ($formula) {
|
||||
$this->cli->runAsUser(trim('brew install '.$formula.' '.implode(' ', $options)), function ($exitCode, $errorOutput) use ($formula) {
|
||||
output($errorOutput);
|
||||
|
||||
throw new DomainException('Brew was unable to install ['.$formula.'].');
|
||||
|
||||
Reference in New Issue
Block a user