From 77679a5659a5104042ec676237a5d61808155243 Mon Sep 17 00:00:00 2001 From: Pavel Puchkin Date: Mon, 7 Jan 2013 01:20:46 +1100 Subject: [PATCH] Respect LARAVEL_ENV variable Laravel **should** respect `LARAVEL_ENV` variable when running through CLI --- laravel/core.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/laravel/core.php b/laravel/core.php index 0f33ccfd..cbfa089a 100644 --- a/laravel/core.php +++ b/laravel/core.php @@ -171,9 +171,9 @@ 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 @@ foreach ($bundles as $bundle => $config) { Bundle::register($bundle, $config); -} \ No newline at end of file +}