Skip to content

Commit e4276a7

Browse files
author
Oleksii Korshenko
committed
MAGETWO-67500: setup:di:compile returns exit code 0 if errors are found #7780
- fixed false positive failures
1 parent b71d5c9 commit e4276a7

File tree

1 file changed

+3
-1
lines changed
  • setup/src/Magento/Setup/Module/Di/Compiler/Log

1 file changed

+3
-1
lines changed

setup/src/Magento/Setup/Module/Di/Compiler/Log/Log.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ public function report()
8686
{
8787
$this->_successWriter->write($this->_successEntries);
8888
$this->_errorWriter->write($this->_errorEntries);
89-
if (count($this->_errorEntries) > 0) {
89+
//do not take into account empty items since they are initialized in constructor.
90+
$errors = array_filter($this->_errorEntries);
91+
if (count($errors) > 0) {
9092
throw new \Magento\Framework\Validator\Exception(__('Error during compilation'));
9193
}
9294
}

0 commit comments

Comments
 (0)