Skip to content

Commit 19cc5d5

Browse files
authored
ENGCOM-5184: Show exception message during SCD failure #22884
2 parents 5557080 + cd0819f commit 19cc5d5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/code/Magento/Deploy/Service/DeployPackage.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ function () use ($package, $options, $skipLogging) {
107107
}
108108

109109
/**
110+
* Execute package deploy procedure when area already emulated
111+
*
110112
* @param Package $package
111113
* @param array $options
112114
* @param bool $skipLogging
@@ -136,7 +138,9 @@ public function deployEmulated(Package $package, array $options, $skipLogging =
136138
$this->errorsCount++;
137139
$this->logger->critical($errorMessage);
138140
} catch (\Exception $exception) {
139-
$this->logger->critical($exception->getTraceAsString());
141+
$this->logger->critical(
142+
'Compilation from source ' . $file->getSourcePath() . ' failed' . PHP_EOL . (string)$exception
143+
);
140144
$this->errorsCount++;
141145
}
142146
}
@@ -219,7 +223,9 @@ private function checkIfCanCopy(PackageFile $file, Package $package, Package $pa
219223
private function checkFileSkip($filePath, array $options)
220224
{
221225
if ($filePath !== '.') {
226+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
222227
$ext = strtolower(pathinfo($filePath, PATHINFO_EXTENSION));
228+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
223229
$basename = pathinfo($filePath, PATHINFO_BASENAME);
224230
if ($ext === 'less' && strpos($basename, '_') === 0) {
225231
return true;

0 commit comments

Comments
 (0)