515d466527
If CDPATH is used non-trivially or the operand is "-", cd writes the directory actually switched to. (We currently do this only in interactive shells, but POSIX requires this in non-interactive shells as well.) As mentioned in Austin group bug #1045, cd shall not return an error while leaving the current directory changed. Therefore, ignore any write error.
7 lines
122 B
Plaintext
7 lines
122 B
Plaintext
# $FreeBSD$
|
|
|
|
# Precondition
|
|
(cd /bin) || exit
|
|
# Verify write error is ignored.
|
|
$SH +m -ic 'CDPATH=/:; cd bin 1</dev/null'
|