fix: hoist nullglob bad-example trap to global scope - #14
Conversation
EXIT traps set inside a subshell function don't fire under Bash 3.2 (macOS default), leaking the temp dir. Mirrors the fix already applied to the paired .good.sh. Closes #13.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Code Review
This pull request moves the creation of a temporary directory and its corresponding cleanup trap from the subshell-based 'main' function to the global scope in 'examples/bash/04-nullglob-empty-match.bad.sh'. This ensures that the cleanup trap is properly registered and executed on script exit. There are no review comments, and I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Merged. Closes out the last outstanding nit from gemini-code-assist's review of #12 (temp-dir leak under Bash 3.2) — thanks to that review for catching it. Repo's clean across all four example domains now. |
Summary
mktemp/trap EXITinexamples/bash/04-nullglob-empty-match.bad.shout of themain() ( ... )subshell to global scope, mirroring the paired.good.shEXITtrap defined inside a subshell never firesCloses #13.
Validation
task citask hooks