This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: changing directory

Hi Eric!

You are right!!!

This CDPATH is the source of the issue!

Thank you for the help - and thanks the others who assisted.


On Mon, May 26, 2008 at 4:08 PM, Eric Blake <> wrote:
> 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
> - --
> Don't work too hard, make some time for fun as well!
> Eric Blake   
> volunteer cygwin bash maintainer
> Version: GnuPG v1.4.9 (Cygwin)
> Comment: Public key at
> Comment: Using GnuPG with Mozilla -
> cJ0AniijSWn3VLKNAVpMorFhRPJVs4Pz
> =A2H5

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]