pipe-tail-corrupts-exit-code-verification
When verifying script exit codes, piping through tail (e.g., script.py | tail -n 5; echo $?) captures tail’s exit code, not the script’s. This caused a false CRITICAL finding during the Helix audit where lint scripts were wrongly flagged as broken. Always capture exit code before piping: script.py > output.txt; echo $? or use ${PIPESTATUS[0]}.
Related
- hypervisor-steal-time-misread-as-process-cpu
- docker-unless-stopped-insufficient-for-critical-services
- docker-daemon-json-log-rotation-already-configured-system-wi
- prometheus-unless-stopped-fails-silently-on-dirty-exit
- helix-lint-scripts-exit-zero-on-failure
- piped-tail-masks-script-exit-code
- pipe-tail-captures-tail-exit-not-script-exit
- pipe-tail-masks-script-exit-code
- tail-pipe-corrupts-exit-code-verification
- pipe-through-tail-masks-script-exit-code
- piped-command-exit-code-masks-primary-script-result
- pipe-through-tail-captures-tails-exit-code-not-scripts
- makefile-awk-help-regex-must-include-digit-character-class