Development record
zsh's `source` (and `.`) of a bare name looks in the current directory before PATH, while bash and the guard's script reader search PATH first, so on a zsh line the guard can judge a different file than zsh runs when both a working-directory file and a PATH file share the name. Left open by lane G on 2026-10-11 while fixing the script-lookup gap (iss-2610111600031244).
issueresolvedminoriss-2610111730551327
zsh's source (and .) of a bare name looks in the current directory before PATH, while bash and the guard's script reader search PATH first, so on a zsh line the guard can judge a different file than zsh runs when both a working-directory file and a PATH file share the name. Left open by lane G on 2026-10-11 while fixing the script-lookup gap (iss-2610111600031244).
Frontmatter
| id | iss-2610111730551327 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2610111730551327-guard-zsh-source-order-differs.md
open on GitHub ↗ · commit history ↗
mentions1
- iss-2610111600031244The guard's script reader resolves a different file than bash runs in three ways: after `cd` it keeps the logical path (so `cd -P link && bash ../s.sh` judges the file beside the link while bash runs the one beside its target), it ignores `CDPATH`, and `source` of a bare name ignores a `PATH` prefix on the same command. Each lets a planted script carrying a bundled blocker run with exit 0.