[2x] Use a non-zero exit code 3 when skipping build tasks #1749
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.
When calling a build task directly, for example with a wrapper like
php hyde sitemap:build
, the command will now exit with status code3
instead of0
, in order to signal that something went wrong. If a task is skipped during the mainphp hyde build
command, nothing will change.The reason behind this is that if you call a specific command like the sitemap build command directly, and it is skipped, then something other than what the user expected happened, so the exit code should reflect that. In comparison: A skipped build task as part of the main site build is not as critical, because in those cases the build task is auxiliary to the expected outcome.
This fixes #1745, please see that issue on how we landed on using exit code
3
when deciding on which non-zero exit code to use.