This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: 1.5.21-2 - Problems with make and/or sh
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: <cygwin at cygwin dot com>
- Date: Wed, 23 Aug 2006 15:44:12 +0100
- Subject: RE: 1.5.21-2 - Problems with make and/or sh
On 23 August 2006 15:31, Jonathan Arnold wrote:
>> although I can't see it in your cygcheck output, I suppose you might
>> have set the CDPATH environment variable. This results in the
>> described effect of cd not working in the sh.exe, we had the problem
>> here. Setting SHELL=/bin/bash in the Makefile also resolved the problem.
>>
>> Hope this helps
>
> Bingo! I unset CDPATH and now it works fine. Nice catch! I knew it had
> to be something like that. I'm not going to set it, as it has caused me
> confusion in the past anyway.
Ah, it's because of the Bash POSIX mode:
6.11 Bash POSIX Mode
====================
[ ... ]
When invoked as `sh', Bash enters POSIX mode after reading the
startup files.
[ ... ]
19. If `CDPATH' is set, the `cd' builtin will not implicitly append
the current directory to it. This means that `cd' will fail if no
valid directory name can be constructed from any of the entries in
`$CDPATH', even if the a directory with the same name as the name
given as an argument to `cd' exists in the current directory.
That's why it didn't work even though sh == bash under cygwin and it works
fine in bash.
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
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/