Skip to main content

parse_bash_output

Function parse_bash_output 

Source
pub fn parse_bash_output(out: BashExecOutput) -> HookOutcome
Expand description

Parse the bash backend’s output per the spec contract.

  1. Empty stdout -> exit 0 = Allow, non-zero = Block (stderr as reason).
  2. stdout starting with { -> parse as JSON decision.
  3. Anything else -> Error (executor failed).