mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #151] [MERGED] [cli] Exit with a non-zero code when a run fails #156
Labels
No labels
api-drift
bug
ci
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Glitchy-Sheep/boosty-downloader#156
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/151
Author: @Glitchy-Sheep
Created: 8/15/2026
Status: ✅ Merged
Merged: 8/15/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:fix/error-exit-codes📝 Commits (1)
7789e7bfix: Exit with a non-zero code when a run fails📊 Changes
3 files changed (+76 additions, -0 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
boosty_downloader/main.py(+11 -0)➕
test/unit/cli/exit_codes_test.py(+64 -0)📄 Description
Summary
Every handled error printed a readable message and then exited with code 0 - for shell scripts, cron jobs and CI the app always "succeeded". Now every error branch exits 1, Ctrl+C exits 130, and a clean run still exits 0.
Problem
entry_point()logged nicely and fell through:$?was 0 after "author not found", "Unauthorized", network failures and even the failure-streak stopboosty-downloader download ... && next-stephappily rannext-stepafter a completely failed runFix
sys.exit(1); messages are untouchedApplicationCancelledError(Ctrl+C) exits 130 - the shell convention for an interrupted run (128 + SIGINT)sys.exitinstead oftyper.Exiton purpose: the ladder lives outside the typer app, wheretyper.Exitwould go unhandledVerification
check --username <nonexistent>exits 1 (was 0);--versionexits 0task checkand 129 unit tests green🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.