Skip to content

Commit da88047

Browse files
author
Oleh Posyniak
committed
MAGETWO-44469: There are errors while switching Magento to "production" mode
1 parent 4556216 commit da88047

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

app/code/Magento/Deploy/Model/Deployer.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,11 @@ private function deployFile($filePath, $area, $themePath, $locale, $module)
312312
}
313313
}
314314

315-
$logMessage = "Processing file '$filePath' for area '$area', theme '$themePath', locale '$locale'";
316-
if ($module) {
317-
$logMessage .= ", module '$module'";
318-
}
319-
320315
if ($this->output->isVeryVerbose()) {
316+
$logMessage = "Processing file '$filePath' for area '$area', theme '$themePath', locale '$locale'";
317+
if ($module) {
318+
$logMessage .= ", module '$module'";
319+
}
321320
$this->output->writeln($logMessage);
322321
}
323322

lib/internal/Magento/Framework/View/Asset/Source.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,12 @@ private function preProcess(LocalInterface $asset)
128128
$this->preProcessorPool->process($chain);
129129
$chain->assertValid();
130130
$dirCode = DirectoryList::ROOT;
131-
if ($chain->isChanged()) {
131+
$directoryReader = $this->filesystem->getDirectoryRead(DirectoryList::STATIC_VIEW);
132+
$targetPath = DirectoryList::TMP_MATERIALIZATION_DIR . '/source/' . $chain->getTargetAssetPath();
133+
134+
if ($chain->isChanged() || !$directoryReader->isExist($targetPath)) {
132135
$dirCode = DirectoryList::VAR_DIR;
133-
$path = DirectoryList::TMP_MATERIALIZATION_DIR . '/source/' . $chain->getTargetAssetPath();
136+
$path = $targetPath;
134137
$this->varDir->writeFile($path, $chain->getContent());
135138
}
136139
$result = [$dirCode, $path];

0 commit comments

Comments
 (0)