From 38b8333fad0506816da58276df73d6dee36a07b2 Mon Sep 17 00:00:00 2001 From: Ihor Sviziev Date: Tue, 14 May 2019 12:58:12 +0300 Subject: [PATCH] magento/magento2#22882 Show exception message during SCD failure --- app/code/Magento/Deploy/Service/DeployPackage.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Deploy/Service/DeployPackage.php b/app/code/Magento/Deploy/Service/DeployPackage.php index 0de339b16ba24..e143648868364 100644 --- a/app/code/Magento/Deploy/Service/DeployPackage.php +++ b/app/code/Magento/Deploy/Service/DeployPackage.php @@ -112,6 +112,8 @@ function () use ($package, $options, $skipLogging) { } /** + * Execute package deploy procedure when area already emulated + * * @param Package $package * @param array $options * @param bool $skipLogging @@ -141,7 +143,9 @@ public function deployEmulated(Package $package, array $options, $skipLogging = $this->errorsCount++; $this->logger->critical($errorMessage); } catch (\Exception $exception) { - $this->logger->critical($exception->getTraceAsString()); + $this->logger->critical( + 'Compilation from source ' . $file->getSourcePath() . ' failed' . PHP_EOL . (string)$exception + ); $this->errorsCount++; } } @@ -224,7 +228,9 @@ private function checkIfCanCopy(PackageFile $file, Package $package, Package $pa private function checkFileSkip($filePath, array $options) { if ($filePath !== '.') { + // phpcs:ignore Magento2.Functions.DiscouragedFunction $ext = strtolower(pathinfo($filePath, PATHINFO_EXTENSION)); + // phpcs:ignore Magento2.Functions.DiscouragedFunction $basename = pathinfo($filePath, PATHINFO_BASENAME); if ($ext === 'less' && strpos($basename, '_') === 0) { return true;