Skip to content

Commit b71d5c9

Browse files
author
Oleksii Korshenko
committed
MAGETWO-67500: setup:di:compile returns exit code 0 if errors are found #7780
- Merge Pull Request #7780 from vaimo/magento2:fix/throw-exception-if-compilation-fails
2 parents d844e31 + 658a30a commit b71d5c9

File tree

1 file changed

+4
-0
lines changed
  • setup/src/Magento/Setup/Module/Di/Compiler/Log

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,15 @@ public function add($type, $key, $message = '')
8080
* Write entries
8181
*
8282
* @return void
83+
* @throws \Magento\Framework\Validator\Exception
8384
*/
8485
public function report()
8586
{
8687
$this->_successWriter->write($this->_successEntries);
8788
$this->_errorWriter->write($this->_errorEntries);
89+
if (count($this->_errorEntries) > 0) {
90+
throw new \Magento\Framework\Validator\Exception(__('Error during compilation'));
91+
}
8892
}
8993

9094
/**

0 commit comments

Comments
 (0)