From f6ba2f86cc811a150bec72d638691bd34d1808a8 Mon Sep 17 00:00:00 2001 From: Luke Rodgers Date: Mon, 13 May 2024 15:29:39 +0100 Subject: [PATCH] Output stderr when in debug mode Some parts of the build process may output to `stderr` without failing the pipeline. For example static content deploy does it here https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Deploy/Service/DeployPackage.php#L144-L147 If you have an issue that you want to debug and you set `MIN_LOGGING_LEVEL: debug` then I think it is unexpected that this data would not be present --- src/Shell/Shell.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Shell/Shell.php b/src/Shell/Shell.php index 4aeab77457..b1565b4943 100644 --- a/src/Shell/Shell.php +++ b/src/Shell/Shell.php @@ -106,6 +106,9 @@ private function handleOutput(ProcessInterface $process) if ($output = $process->getOutput()) { $this->logger->debug($output); } + if ($errorOutput = $process->getErrorOutput()) { + $this->logger->debug('Error: ' . $errorOutput); + } } catch (LogicException $exception) { $this->logger->error('Can\'t get command output: ' . $exception->getMessage()); }