Commit 77679a56 authored by Pavel Puchkin's avatar Pavel Puchkin

Respect LARAVEL_ENV variable

Laravel **should** respect `LARAVEL_ENV` variable when running through CLI
parent 05cb1ea5
...@@ -171,9 +171,9 @@ Request::$foundation = RequestFoundation::createFromGlobals(); ...@@ -171,9 +171,9 @@ Request::$foundation = RequestFoundation::createFromGlobals();
if (Request::cli()) if (Request::cli())
{ {
$environment = get_cli_option('env'); $environment = get_cli_option('env', getenv('LARAVEL_ENV'));
if ( ! isset($environment)) if (empty($environment))
{ {
$environment = Request::detect_env($environments, gethostname()); $environment = Request::detect_env($environments, gethostname());
} }
...@@ -240,4 +240,4 @@ $bundles = require path('app').'bundles'.EXT; ...@@ -240,4 +240,4 @@ $bundles = require path('app').'bundles'.EXT;
foreach ($bundles as $bundle => $config) foreach ($bundles as $bundle => $config)
{ {
Bundle::register($bundle, $config); Bundle::register($bundle, $config);
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment