Home /Examples/lib/examples/sleela/CLI-16-environment-and-exit-status.md

CLI-16-environment-and-exit-status.md

lib/examples/sleela/CLI-16-environment-and-exit-status.md · 26 line(s) · markdown

Environment variables and exit status

VariableMeaning
SLEELA_SHA256_MANIFESTTrusted SHA-256 manifest path
SLEELA_DEFENDER_OPTINExplicit Defender opt-in
SLEELA_DEFENDER_ALLOW_ROOTExplicit privileged-install opt-in
SLEELA_DOCS_DIRSleelaDoc corpus directory
SLEELA_FACADE_PATHDefault facade search root

The command exits zero on success and non-zero on parse, resolution, semantic, verification, or runtime failure.

if sleela check path/to/program.sleela; then
    echo "check passed"
else
    rc=$?
    echo "check failed: $rc" >&2
    exit "$rc"
fi

Never bypass a failed SHA-256 verification gate by disabling verification or substituting an untrusted manifest.