Skip to content

Commit

Permalink
[BUGFIX] Properly detect CLI request
Browse files Browse the repository at this point in the history
  • Loading branch information
helhum committed Sep 9, 2019
1 parent 5f98557 commit 3b8b4f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ConfigLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use Helhum\ConfigLoader\Processor\PlaceholderValue;
use Helhum\TYPO3\ConfigHandling\Processor\ExtensionSettingsSerializer;
use Helhum\Typo3Console\Mvc\Cli\Symfony\Input\ArgvInput;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Service\OpcodeCacheService;
use TYPO3\CMS\Core\Utility\GeneralUtility;

Expand Down Expand Up @@ -73,7 +74,7 @@ public function populate()

private function shouldCache(): bool
{
if (PHP_SAPI !== 'cli') {
if (!Environment::isCli()) {
return $this->isProduction || getenv('TYPO3_CONFIG_HANDLING_CACHE');
}
if (getenv('TYPO3_CONSOLE_SUB_PROCESS')) {
Expand Down

0 comments on commit 3b8b4f8

Please sign in to comment.