Change the exit code when "no changes found to commit." #161
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.
I am incorporating Terminus to allow for integration between a CI workflow and my Pantheon environment.
Currently, because of other things involved in the CI workflow, there are a number of builds happening that don't include changes to the Drupal docroot. In these cases, there are no code changes to the Pantheon environment which triggers the "No changes found to commit" message towards the end of the build process.
Since this message is being returned with
drush_set_error()
it is causing the deployment step to exit with an error code. This triggers a build failure even though the step is doing exactly what it should do and skipping over the commit process.I propose changing this to
drush_user_abort()
which will not exit with an error code but will continue to function exactly as it did previously and exit the process immediately once Terminus determines no changes are present.