Home/Docs/Reference/Exit Codes

Exit codes for bake commands.

Exit Codes

Standard exit codes

CodeMeaning
0Success
1Failure (command-specific)
2Operational error (tooling, network, etc.)

Command-specific codes

bake audit

CodeMeaning
0No critical/high findings
1At least one critical/high finding
2Operational error: Radar missing, Docker unavailable, or Radar exit 2

bake deploy

CodeMeaning
0Deploy successful
1Deploy failed (build error, insufficient funds, etc.)
2Operational error (tooling, network)

bake doctor

CodeMeaning
0All checks passed (including warnings)
Non-zeroGenuine failure detected

CI usage

Use exit codes in CI pipelines:

bash
# Block on audit failures
bake audit --ci || exit 1

# Conditional deploy
bake audit --ci && bake deploy --ci --yes

Radar exit codes

Radar uses:

  • 0 โ€” clean
  • 1 โ€” findings at/above --fail-on
  • 2 โ€” operational error

bake maps Radar's exit 2 (often caused by Docker startup failures) to bake's exit 2, not exit 1. This prevents Docker issues from being misreported as security findings.

Sourced from local MDX in docs/content/docs