Expand description
Bespoke Unix exit codes per error code.
Most aube errors exit with the generic EXIT_GENERIC (1). A
curated subset — the ones a CI script or shell pipeline most often
wants to branch on — gets its own exit code so callers can react
without parsing stderr.
Exit codes are declared inline on each crate::CodeMeta entry
in crate::errors::ALL; this module just provides the lookup.
The 8-bit exit-code space is lean (POSIX reserves several values 126–165 for shell signals), so codes are allocated in 10-wide ranges by category, with room to grow:
| range | category |
|---|---|
| 1 | generic / unknown error |
| 2 | CLI usage error |
| 10–19 | lockfile |
| 20–29 | resolver |
| 30–39 | tarball / store |
| 40–49 | registry / network |
| 50–59 | scripts / build |
| 60–69 | linker |
| 70–79 | manifest / workspace |
| 80–89 | engine / cli surface |
| 90–99 | misc / safety |
Tooling consumers should branch on the exit code rather than the exit category, since the categories are documentation, not API.
Constants§
- EXIT_
CLI_ USAGE - CLI usage error — bad flags, conflicting options, missing required arguments. Reserved as a convention, not currently emitted by aube itself (clap exits with this code on its own).
- EXIT_
GENERIC - Generic catch-all. Anything not explicitly assigned an exit code
in
crate::errors::ALLresolves to this exit code.
Functions§
- exit_
code_ for - Returns the bespoke exit code for
code, orNoneif the code has no bespoke entry (the caller should useEXIT_GENERIC).