docs(cli): document exit code 1 and clarify exit 0 semantics#871
Merged
Conversation
The Exit Codes table in the CLI reference only listed 0 and 2, but the CLI also exits with 1 on fatal errors (missing environment variables, Docker unavailable, invalid config file, diff-scope resolution failure, or an unhandled exception). It also implied exit 0 means no vulnerabilities were found, which is only true in headless mode - interactive runs always exit 0 regardless of findings. Document exit code 1 and clarify the two cases for exit 0.
Contributor
Greptile SummaryUpdates the CLI exit-code documentation to distinguish interactive and headless success semantics and document fatal-error exit code Confidence Score: 5/5The documentation-only change appears safe to merge. The revised table matches the CLI’s observable exit behavior: interactive findings do not produce status 2, headless findings do, and fatal setup or runtime errors produce status 1. Important Files Changed
Reviews (1): Last reviewed commit: "docs(cli): document exit code 1 and clar..." | Re-trigger Greptile |
|
i approve |
0xallam
approved these changes
Jul 25, 2026
5hy7xz92nd-oss
left a comment
There was a problem hiding this comment.
PATPAT WEAREONE10BILLION APPROVAL ON ALL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Exit Codes table in the CLI reference only listed
0and2, but the CLI also exits with1on fatal errors — missing environment variables, Docker unavailable, an invalid config file, diff-scope resolution failure, or an unhandled exception (all instrix/interface/main.py).The table also implied exit
0means no vulnerabilities were found, which only holds in headless mode; interactive runs always exit0regardless of findings (exit2is gated onargs.non_interactive).This documents exit code
1and clarifies the two cases for exit0. Docs-only change.