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: /etc/profile always does a "cd $HOME"


>>>>i'd like to use cygwin from a normal windows-app. The problem is, that i
>>>>need a login-shell, so that all environment-vars are properly set. The
>>>>problem: bash -li always changes the current workdir!
>> 
>>The point was "a flly functional" environment, and just adding /bin to
>>the PATH is only half the things, i'd need to do.
> 
> If you have a recent* /etc/profile from base-files, pretend you're chere. From a
> batch file:
> 
> set CHERE_INVOKING=y
> bash -li <somecommand>
> set CHERE_INVOKING=
> 
> From a sh script:
> 
> CHERE_INVOKING=y && bash -li <somecommand>

The file in /etc/defaults/etc/profile has this CHERE_INVOKING thing, but
for some reason, that file wasn't copied to /etc/profile.

Can you imagine why?


--
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/


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