diff --git a/src/Cli/Symfony/ConsoleKernel.php b/src/Cli/Symfony/ConsoleKernel.php index 8c836f72..391eacab 100644 --- a/src/Cli/Symfony/ConsoleKernel.php +++ b/src/Cli/Symfony/ConsoleKernel.php @@ -11,6 +11,7 @@ namespace TYPO3\Surf\Cli\Symfony; +use Phar; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerInterface; use Symfony\Component\Config\Loader\LoaderInterface; @@ -67,8 +68,21 @@ protected function build(ContainerBuilder $container): void ); } - public function getProjectDir(): string + public function getCacheDir(): string { - return \dirname(__DIR__, 3); + if(Phar::running() !== '') { + return sys_get_temp_dir() . '/_surf'; + } + + return parent::getCacheDir(); + } + + public function getLogDir(): string + { + if(Phar::running() !== '') { + return sys_get_temp_dir() . '/_surf_log'; + } + + return parent::getLogDir(); } }