lix/doc/manual/src/command-ref/status-build-failure.md
John Ericson 97df060588 Better document build failure exit codes
- Improved API docs from comment

- Exit codes are for `nix-build`, not just `nix-store --release`

- Make note in tests so the magic numbers are not surprising

Picking up where #8387 left off.
2023-06-22 14:29:45 -04:00

950 B

Special exit codes for build failure

1xx status codes are used when requested builds failed. The following codes are in use:

  • 100 Generic build failure

    The builder process returned with a non-zero exit code.

  • 101 Build timeout

    The build was aborted because it did not complete within the specified timeout.

  • 102 Hash mismatch

    The build output was rejected because it does not match the outputHash attribute of the derivation.

  • 104 Not deterministic

    The build succeeded in check mode but the resulting output is not binary reproducible.

With the --keep-going flag it's possible for multiple failures to occur. In this case the 1xx status codes are or combined using bitwise OR.

0b1100100
     ^^^^
     |||`- timeout
     ||`-- output hash mismatch
     |`--- build failure
     `---- not deterministic