Browse Source

Merge pull request #1573 from neoascetic/patch-1

Respect LARAVEL_ENV variable
Taylor Otwell 12 years ago
parent
commit
ff7f6f67db
1 changed files with 3 additions and 3 deletions
  1. 3 3
      laravel/core.php

+ 3 - 3
laravel/core.php

@@ -171,9 +171,9 @@ Request::$foundation = RequestFoundation::createFromGlobals();
 
 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());
 	}
@@ -240,4 +240,4 @@ $bundles = require path('app').'bundles'.EXT;
 foreach ($bundles as $bundle => $config)
 {
 	Bundle::register($bundle, $config);
-}
+}