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

Fix for issue #250 - brew package nginx-full not properly recognized as a valid nginx installation

This commit is contained in:
Pierre-Luc Brunet
2017-01-04 14:27:18 -05:00
parent 3f9bce7744
commit 976561a2bf
2 changed files with 14 additions and 1 deletions

View File

@@ -45,6 +45,17 @@ function hasInstalledPhp()
|| $this->installed('php56');
}
/**
* Determine if a compatible nginx version is Homebrewed.
*
* @return bool
*/
function hasInstalledNginx()
{
return $this->installed('nginx')
|| $this->installed('nginx-full');
}
/**
* Ensure that the given formula is installed.
*

View File

@@ -37,7 +37,9 @@ function __construct(Brew $brew, CommandLine $cli, Filesystem $files,
*/
function install()
{
$this->brew->ensureInstalled('nginx', ['--with-http2']);
if (!$this->brew->hasInstalledNginx()) {
$this->brew->installOrFail('nginx', ['--with-http2']);
}
$this->installConfiguration();
$this->installServer();