diff --git a/deployer/typo3-recipe.php b/deployer/typo3-recipe.php index 3c4b387..a8182ac 100644 --- a/deployer/typo3-recipe.php +++ b/deployer/typo3-recipe.php @@ -132,7 +132,11 @@ task('typo3:cache:flush', function () { task('typo3:cache:warmup', function () { cd('{{release_or_current_path}}'); - run('{{bin/php}} bin/typo3 cache:warmup 2>&1'); + // Append exit code so run() won't throw before we can read the output + $result = run('{{bin/php}} -d display_errors=1 bin/typo3 cache:warmup 2>&1; echo EXIT_CODE:$?'); + if (!str_contains($result, 'EXIT_CODE:0')) { + throw new \RuntimeException("cache:warmup failed:\n" . $result); + } })->desc('Warmup TYPO3 caches'); task('typo3:language:update', function () {