Skip to content

Commit 2e96bde

Browse files
committed
Check $_SERVER first for env value
1 parent 827a412 commit 2e96bde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

system/Commands/Utilities/Environment.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function run(array $params)
7979
{
8080
if ($params === [])
8181
{
82-
CLI::write(sprintf('Your environment is currently set as %s.', CLI::color(ENVIRONMENT, 'green')));
82+
CLI::write(sprintf('Your environment is currently set as %s.', CLI::color($_SERVER['CI_ENVIRONMENT'] ?? ENVIRONMENT, 'green')));
8383
CLI::newLine();
8484

8585
return;
@@ -119,7 +119,7 @@ public function run(array $params)
119119
(new DotEnv(ROOTPATH))->load();
120120

121121
CLI::write(sprintf('Environment is successfully changed to "%s".', $env), 'green');
122-
CLI::write('The ENVIRONMENT constant will be changed on the next script execution.');
122+
CLI::write('The ENVIRONMENT constant will be changed in the next script execution.');
123123
CLI::newLine();
124124
}
125125

0 commit comments

Comments
 (0)