exitcode-demo / policy

policy - cli-guard examples/exitcode

NAME

policy - exit 2 (PolicyDenied)

SYNOPSIS

policy

DESCRIPTION

Returns exitcode.New(PolicyDenied, ...). Process exits 2. The yaml envelope on stderr is the structured form an orchestrator parses.

Examples:

exitcode-demo policy ; echo "exit: $?"
# error:
#     kind: policy
#     message: argv rejected
#     hint: fix the input
# exit: 2

Treat exit 2 as authoritative-non-retryable.

Usage:

policy [GLOBAL OPTIONS] [command [COMMAND OPTIONS]] [ARGUMENTS...]