X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave.korn@artimi.com>
To: <cygwin@cygwin.com>
Subject: RE: 1.5.21-2 - Problems with make and/or sh
Date: Wed, 23 Aug 2006 15:44:12 +0100
Message-ID: <022f01c6c6c2$9937bdc0$a501a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; 	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <44EC66AD.2020409@buddydog.org>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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/

