This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: changing directory
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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
CDPATH.
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
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
iEYEARECAAYFAkg6tmMACgkQ84KuGfSFAYAZcwCg0BR/T5wh1UTCREKi4qtXHy0d
cJ0AniijSWn3VLKNAVpMorFhRPJVs4Pz
=A2H5
-----END PGP SIGNATURE-----
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/