Skip to content
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

[2x] Use a non-zero exit code 3 when skipping build tasks #1749

Merged
merged 4 commits into from
Jun 28, 2024

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented Jun 28, 2024

When calling a build task directly, for example with a wrapper like php hyde sitemap:build, the command will now exit with status code 3 instead of 0, in order to signal that something went wrong. If a task is skipped during the main php 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.

@caendesilva caendesilva mentioned this pull request Jun 28, 2024
74 tasks
Copy link

codecov bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.97%. Comparing base (b8d30ba) to head (d90dcc7).
Report is 1 commits behind head on 2.x-dev.

Additional details and impacted files
@@            Coverage Diff             @@
##             2.x-dev    #1749   +/-   ##
==========================================
  Coverage      99.97%   99.97%           
  Complexity      1808     1808           
==========================================
  Files            185      185           
  Lines           4788     4788           
==========================================
  Hits            4787     4787           
  Misses             1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@caendesilva caendesilva changed the title [2x] Use a non-zero exit code when skipping build tasks [2x] Use a non-zero exit code 3 when skipping build tasks Jun 28, 2024
@caendesilva caendesilva marked this pull request as ready for review June 28, 2024 13:56
@caendesilva caendesilva merged commit 8407347 into 2.x-dev Jun 28, 2024
7 checks passed
@caendesilva caendesilva deleted the skipped-build-task-exit-codes branch June 28, 2024 13:57
@caendesilva caendesilva added this to the v2 milestone Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant