Skip to content

fix: Exit with status 1 when a command fails - #134

Merged
bastianallgeier merged 3 commits into
developfrom
fix/exit-code-on-error
Oct 8, 2026
Merged

bastianallgeier merged 3 commits into
developfrom
fix/exit-code-on-error

Conversation

@distantnative

Copy link
Copy Markdown
Member

Review

  • Rough pass

Timing:

Description

When a command throws, CLI::handleException() prints the error and then calls a bare exit;, so the process ends with status 0. To a shell, cron, CI or a monitoring service, every failed command looks like it succeeded.

handleException() now calls exit(1). The error output is unchanged and --debug still rethrows.

Changelog

🐛 Bug fixes

  • Failed commands now exit with status 1 instead of 0, so shells, CI, cron and monitoring can detect them.

@distantnative distantnative self-assigned this Oct 8, 2026
@distantnative distantnative added this to the 1.11.0 milestone Oct 8, 2026
@bastianallgeier
bastianallgeier merged commit 6cb926f into develop Oct 8, 2026
10 checks passed
@bastianallgeier
bastianallgeier deleted the fix/exit-code-on-error branch October 8, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants