Closed hyperupcall closed 2 months ago
Hi @hyperupcall can you explain a scenario when this might cause problems? Do you perhaps have an idea for a test we could add in this repo? The change itself sounds sensible for a bit of extra complexity, but also wondering why this wasn't necessary until now?
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
cli.sh | 2 | 83.79% | ||
<!-- | Total: | 2 | --> |
Totals | |
---|---|
Change from base Build 4543718405: | 0.1% |
Covered Lines: | 2515 |
Relevant Lines: | 3136 |
As mentioned in POSIX, the environment variable
CDPATH
chagnes the behavior ofcd
. Notably, it can cause the directory to be changed to an unexpected location. This makes the script less deterministic.My changeset causes
CDPATH
to be taken account by either unsetting it, or setting it to an empty string.