This is the mail archive of the
mailing list for the Cygwin project.
Re: changing directory
-----BEGIN PGP SIGNED MESSAGE-----
According to Gadi Oron on 5/25/2008 11:50 PM:
| Anyway, I believe that I've pin-pointed the behaviour of bash -c (when
| executed as sh).
| The fault is that executing
| /bin/sh -c "cd <dir>"
| will fail for <din> in the working folder unless it has a preceding "./"
Do you, perchance, have CDPATH set? Bash has a bug where if it is in
POSIX-compatible mode (which it is when started as sh rather than bash)
and CDPATH is set, it refuses to look in . if CDPATH did not include `.'.
~ This is exactly opposite what POSIX requires, but the bash maintainer
claims that he did that in order to obey POSIX. At any rate, I've
reported it upstream (several times), and it hasn't been fixed yet. The
workaround is to either not use CDPATH, or to add . as one of the paths on
Don't work too hard, make some time for fun as well!
Eric Blake firstname.lastname@example.org
volunteer cygwin bash maintainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html