preflight · 8 checks
I ran a script or pipeline
A shell script, CI step or command pipeline completed.
Before you call it done
- Read the status of the command you care about, not the last one.
set -o pipefail; or echo ${PIPESTATUS[@]}guards against NS-015 - Confirm it did not exit early on an unrelated precondition.
Under set -e a global validation step aborts before the step you wanted.guards against NS-008 - Confirm every child's status was collected.
wait $pid per child; bare wait returns 0 regardlessguards against NS-053 - Confirm it returned at all rather than waiting on a prompt.
sudo -n true returns non-zero immediately when a password would be needed; wrap in timeoutguards against NS-014 - Check redirections point where you think.
cmd >f 2>&1 sends both to f; cmd 2>&1 >f does notguards against NS-066 NS-054 - Confirm it did not tear down the environment it was running inside.
Compare the teardown target against $TMUX, the current container, the host you are on.guards against NS-013 - Refuse empty path variables rather than letting a builtin succeed on nothing.
: "${DIR:?DIR is empty}"; cd "$DIR" && [ "$PWD" = "$DIR" ]guards against NS-080 NS-082 - Split declaration from assignment so the status survives.
local out; out=$(cmd) # local out=$(cmd) always returns 0guards against NS-081
Plain text: /recipes.txt
· all tasks