Skip to content

Commit ff7f6f6

Browse files
committed
Merge pull request laravel#1573 from neoascetic/patch-1
Respect LARAVEL_ENV variable
2 parents 2946274 + 77679a5 commit ff7f6f6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

laravel/core.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@
171171

172172
if (Request::cli())
173173
{
174-
$environment = get_cli_option('env');
174+
$environment = get_cli_option('env', getenv('LARAVEL_ENV'));
175175

176-
if ( ! isset($environment))
176+
if (empty($environment))
177177
{
178178
$environment = Request::detect_env($environments, gethostname());
179179
}
@@ -240,4 +240,4 @@
240240
foreach ($bundles as $bundle => $config)
241241
{
242242
Bundle::register($bundle, $config);
243-
}
243+
}

0 commit comments

Comments
 (0)