Skip to main content

Module exit

Module exit 

Source
Expand description

Exit-code convention shared by all ctx commands.

ctx uses a three-way exit-code convention (similar to grep or linters), plus one reserved code for harness compatibility checks:

CodeMeaning
0Success, no findings
1Command ran successfully but produced findings
2Operational error (bad arguments, missing index, IO, …)
3Version requirement not met (ctx harness compat only)

Commands return Ok(Outcome::Clean) or Ok(Outcome::Findings); any Err(_) maps to exit code 2 in main.

Enums§

Outcome
The successful outcome of a command, mapped to a process exit code.