delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/08/23/10:44:30

X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT 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
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <44EC66AD.2020409@buddydog.org>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019