sstephenson / bats

Bash Automated Testing System
MIT License
7.12k stars 519 forks source link

Use empty CDPATH with `cd` in abs_dirname/expand_path #159

Open blueyed opened 8 years ago

blueyed commented 8 years ago

While not recommended [1] CDPATH might be exported and would be used for e.g. cd test instead of using ./test. E.g. Vim will make use of it (and therefore it needs to be exported, if you do not want to configure it twice).

Fixes https://github.com/sstephenson/bats/issues/104.

This supersedes https://github.com/sstephenson/bats/pull/119: there is no need to unset/change CDPATH globally.

1: https://bosker.wordpress.com/2012/02/12/bash-scripters-beware-of-the-cdpath/

msabramo commented 8 years ago

👍

blueyed commented 7 years ago

Amended to use set -p instead.

spinus commented 4 years ago

is this still alive? Possible to merge if that solves the issue?