Commit 930a3e89 authored by Taylor Otwell's avatar Taylor Otwell

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

Check  against host name for CLI commands
parents b1707f2b 1aabbc38
...@@ -148,15 +148,19 @@ Request::$foundation = RequestFoundation::createFromGlobals(); ...@@ -148,15 +148,19 @@ Request::$foundation = RequestFoundation::createFromGlobals();
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| 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
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment