Created
October 14, 2012 16:14
-
-
Save andylolz/3889054 to your computer and use it in GitHub Desktop.
Make key:generate work with the --env switch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/laravel/cli/tasks/key.php b/laravel/cli/tasks/key.php | |
| index 0c08a84..b7b5d00 100644 | |
| --- a/laravel/cli/tasks/key.php | |
| +++ b/laravel/cli/tasks/key.php | |
| @@ -19,7 +19,14 @@ class Key extends Task { | |
| */ | |
| public function __construct() | |
| { | |
| - $this->path = path('app').'config/application'.EXT; | |
| + if($environment = get_cli_option('env')) | |
| + { | |
| + $this->path = path('app').'config/'.$environment.'/application'.EXT; | |
| + } | |
| + else | |
| + { | |
| + $this->path = path('app').'config/application'.EXT; | |
| + } | |
| } | |
| /** |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Never mind! (Someone already fixed this!)[http://github.com/laravel/laravel/issues/885]