-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #3796: Deploy command continues despite composer failure #3809
Conversation
Added space in between if statement for code standards
Updated composer error message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see this handle other cases. This only handles the composer case.
However, handling one case is better than none, and it addresses exactly #3796. Approving.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the contribution. The code looks good (following the pattern used elsewhere in BLT) and I've verified that it fixes the issue.
This awaits one more internal review.
We will fix this more generally with a refactor in #3811
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, but I wonder if Robo has something to automatically throw in these cases.
@alexxed we are checking on that with the Robo maintainers here: consolidation/robo#891 But for now, it looks like no, Robo does not throw exceptions, it just provides an exit code. |
* Made the deploy command fail and stop on `composer install` exception. * Made the deploy command fail and stop on `composer install` exception. * Update DeployCommand.php Added space in between if statement for code standards * Update DeployCommand.php Updated composer error message
Fixes #3796
Changes proposed
Added logic check to see if the
composer install
command was successful, and if not interrupt the deployment to prevent corrupt environment codeSteps to replicate the issue
blt artifact:deploy
[Exception] Cannot apply patch This doesn't apply (https://www.drupal.org/files/issues/entity-browser-view-context-2865928-14.patch)!
Previous (bad) behavior, before applying PR
Corrupt environment code on deployment and ignored the composer error
Expected behavior, after applying PR and re-running test steps
An exception is now thrown and the process is stopped, preventing a corrupted artifact deployment