Unset CDPATH if it is set.

Apparently on some (probably buggy) platforms, when CDPATH is set, the
'cd' command will always print text to stdout.  This caused fail 122
and 123 in shelltest.od.

CDPATH is an interactive-mode option, so let's clear it when running
scripts.
This commit is contained in:
Avery Pennarun 2019-05-01 13:17:35 -04:00
commit 642d6fa193
3 changed files with 6 additions and 1 deletions

View file

@ -17,6 +17,9 @@ usage: do [-d] [-x] [-v] [-c] <targets...>
It will never rebuild a target it has already built, unless you use -c.
"
# CDPATH apparently causes unexpected 'cd' output on some platforms.
unset CDPATH
# By default, no output coloring.
green=""
bold=""