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: Setting CHERE_INVOKING=1 does not work because of case mismatch


On 03/12/2010 7.08, Lennart Borgman wrote:
On Fri, Dec 3, 2010 at 6:51 AM, Andy Koppe<andy.koppe@gmail.com> wrote:
On 2 December 2010 22:31, Lennart Borgman wrote:
In current cygwin (just updated) I need to downcase the test for
CHERE_INVOKING in .profile to make it work

To make what work?


/bin/xhere, the part of the chere package that cd's to the required
directory and invokes the user's shell, sets CHERE_INVOKING in
uppercase, as it always has done.

I am using this to start Cygwin from a cmd prompt:


   @echo off
   @rem Had to change chere_invoking in .profile to lower case.
   set CHERE_INVOKING=1
   C:\cygwin\bin\bash --login -i

Is there a better way to do it?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


I guess you should check whether, prior to launch your .BAT file, the CHERE_INVOKING variable is already defined in the environment in lowercase.


I mean that if I do:

SET chere_invoking=0

and then later with the same environment (or inherited one):

SET CHERE_INVOKING=1

I have "chere_invoking=1" in my environment (in lower case).

C:\>set chere_invoking=0

C:\>set CHERE_INVOKING=1

    C:\>set | grep -i chere
    chere_invoking=1

So before you launch your .BAT file do a:

set | grep -i chere

and see whether CHERE_INVOKING is already defined in lower case in your environment.

Ciao,
    Danilo

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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