Merge pull request #736 from joecwallace/cli-env-management

Check  against host name for CLI commands
This commit is contained in:
Taylor Otwell 2012-06-03 15:35:33 -07:00
commit 930a3e89e0
1 changed files with 8 additions and 4 deletions

View File

@ -148,15 +148,19 @@
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Next we're ready to determine the application environment. This may be | Next we're ready to determine the application environment. This may be
| set either via the command line options, or, if the request is from | set either via the command line options or via the mapping of URIs to
| the web, via the mapping of URIs to environments that lives in | environments that lives in the "paths.php" file for the application and
| the "paths.php" file for the application and is parsed. | is parsed. When determining the CLI environment, the "--env" CLI option
| overrides the mapping in "paths.php".
| |
*/ */
if (Request::cli()) if (Request::cli())
{ {
$environment = get_cli_option('env'); $environment = get_cli_option('env');
if (! isset($environment)) {
$environment = Request::detect_env($environments, gethostname());
}
} }
else else
{ {