moved errorCount to beginning to account for errors in all themes, no… #6171
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For deployment, we need
bin/magento
to exit with a return code != 0 to indicate if something went wrong.As far as I am aware this issue is at least related to following other issues:
The above pull request already addresses the issue that
\Magento\Framework\Console\Cli::RETURN_FAILURE
will be used if$this->errorCount > 0
.However, the current develop branch sets
$this->errorCount = 0;
for every iteration, which clears errors from previous themes.I would suggest moving the errorCount to the beginning of deploy function, to account for all errors in all steps, because otherwise it gets reset everytime and only the last step in the loop will count.
Preconditions
Steps to reproduce
mkdir -p app/design/frontend/Magento/luma/Magento_Email/web/css/ && touch app/design/frontend/Magento/luma/Magento_Email/web/css/email.less
bin/magento setup:static-content:deploy
Successful: 2138 files; errors: 1
Expected result
echo $?
should be!=0
after running taskActual result
echo $?
is0