Skip to content

Conversation

@emmadesilva
Copy link
Member

@emmadesilva emmadesilva 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.

@codecov
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.

@emmadesilva emmadesilva 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
@emmadesilva emmadesilva marked this pull request as ready for review June 28, 2024 13:56
@emmadesilva emmadesilva merged commit 8407347 into 2.x-dev Jun 28, 2024
@emmadesilva emmadesilva deleted the skipped-build-task-exit-codes branch June 28, 2024 13:57
@emmadesilva emmadesilva 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