diff --git a/examples/bash/04-nullglob-empty-match.bad.sh b/examples/bash/04-nullglob-empty-match.bad.sh index c349869..b045f1a 100755 --- a/examples/bash/04-nullglob-empty-match.bad.sh +++ b/examples/bash/04-nullglob-empty-match.bad.sh @@ -5,9 +5,10 @@ # expect-shellcheck: none set -euo pipefail +tmp=$(mktemp -d) +trap 'rm -rf "$tmp"' EXIT + main() ( - tmp=$(mktemp -d) - trap 'rm -rf "$tmp"' EXIT cd "$tmp" for file in *.txt; do