Vivarium · Layer 2 · Docker (catalogue)

Bash local shadows command-substitution exit code

When local is combined with command substitution, local's own (always-zero) exit code overrides the right-hand side. set -e therefore silently bypasses failures on the RHS, leading to silent breakage in production scripts. Documented bash + POSIX behaviour, not an upstream defect — the page makes the surprise reproducible in seconds.

CI verdict snapshot

Loading verdict snapshot…

Reproduce yourself

docker run --rm ghcr.io/aletheia-works/vivarium-bash-local-shadows-exit:latest

First-pull cost ~10 MB (bash:5.2 alpine). Run takes under a second. See the recipe directory for the Dockerfile and repro.sh.

CI snapshot output

(loading…)