Skip to content

feat(cli): standardize Unix exit codes (0/1/2/130) and centralize exit handling - #271

Merged
ZergsLaw merged 1 commit into
mainfrom
feat/unix-exit-codes
Dec 4, 2026
Merged

ZergsLaw merged 1 commit into
mainfrom
feat/unix-exit-codes

Conversation

@ZergsLaw

@ZergsLaw ZergsLaw commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Standardizes CLI exit codes across all commands to the Unix linter contract (0 success, 1 check/inspection findings, 2 operational/config/usage/runtime error, 130 signal interruption). Replaces direct os.Exit calls in internal/api with *api.ExitError, installs a no-op ExitErrHandler in cmd/easyp/main.go so defers always run and runCLI is the single exit-code mapper, eliminates stray stderr lines on validate-config and ls-files findings, updates .spec/CLI.md, .spec/ERRORS.md, .spec/agent-rules.md, and V1_RELEASE_NOTES.md, and adds full in-process and compiled-binary exit-code tests.

@ZergsLaw
ZergsLaw merged commit 8679cc9 into main Dec 4, 2026
4 checks passed
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