Skip to content

Commit

Permalink
ALTER_CLI_RUNNER overrites default environment
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiopvilar committed May 22, 2016
1 parent 2e79720 commit b0aaac4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ public function rewrite_url( $wp_rewrite ) {
}

private function getEnv() {
if(defined('ALTER_CLI_RUNNER')) return 'CLI';
$by_env = getenv("AMPERSAND_ENV");
if(!empty($by_env) && !defined('AMPERSAND_ENV')) define('AMPERSAND_ENV', $by_env);
return defined('AMPERSAND_ENV') ? AMPERSAND_ENV : 'WP';
Expand Down

0 comments on commit b0aaac4

Please sign in to comment.