Juggernaut.CLI.ExitCode (Juggernaut v0.4.0)

Copy Markdown View Source

Exit codes shared by every mix juggernaut* task (see the agent output guide).

CodeMeaning
0Gate passed, or a read-only task succeeded.
1Gate failed or incomplete.
2Usage or configuration error. Nothing was scored.
3Infrastructure or harness error. Never a verdict.

When several apply the precedence is 2, then 3, then 1, then 0.

Summary

Functions

Combines several exit codes by precedence (2, then 3, then 1, then 0).

Ends a Mix task with code: returns :ok for 0, otherwise exits with {:shutdown, code}, which Mix turns into the process exit status.

The exit code for an outcome: :ok, :gate_failed or a Juggernaut.Error.

Types

t()

@type t() :: 0..3

Functions

combine(codes)

@spec combine([t()]) :: t()

Combines several exit codes by precedence (2, then 3, then 1, then 0).

halt(code)

@spec halt(t()) :: :ok | no_return()

Ends a Mix task with code: returns :ok for 0, otherwise exits with {:shutdown, code}, which Mix turns into the process exit status.

of(arg1)

@spec of(:ok | :gate_failed | Juggernaut.Error.t()) :: t()

The exit code for an outcome: :ok, :gate_failed or a Juggernaut.Error.