Setting CHERE_INVOKING=1 does not work because of case mismatch

Lennart Borgman lennart.borgman@gmail.com
Fri Dec 3 13:32:00 GMT 2010


On Fri, Dec 3, 2010 at 1:27 PM, Andy Koppe <andy.koppe@gmail.com> wrote:
> On 3 December 2010 06:08, Lennart Borgman wrote:
>> On Fri, Dec 3, 2010 at 6:51 AM, Andy Koppe 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
>
> That works fine for me: it does start bash without changing the
> current directory. I can't think of any reason why CHERE_INVOKING
> would be converted to lowercase. How did you verify that that is
> what's happening?

By doing the change to .profile I told about in my first message, i.e.
downcase the name in the check:

  if [ ! -z "${chere_invoking}" ]; then
       unset CHERE_INVOKING
   else
       cd "${HOME}"
   fi

However today it works the opposite to my surprise. (So I have doubled
the check right now.)

The only change I know I have made to Cygwin at the moment is
installing Ruby (and thereby running an update of Cygwin) and trying
to do "gem install xmlparse" which fails with w32 Ruby (unfortunately
it also fails under Cygwin Ruby for me).


> Also, cygcheck output as requested at http://cygwin.com/problems.html
> might provide clues.

Attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 70916 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20101203/df80ca23/attachment.obj>
-------------- next part --------------
--
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


More information about the Cygwin mailing list