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: how to get the windows PATH env in cygwin


On Tue, Dec 1, 2009 at 10:03 AM, Andy Koppe <> wrote:
> 2009/12/1 Reinier Post:
>>> If you want to see the Windows PATH setting unmolested by Cygwin, you
>>> will either need to strip out the additions set by /etc/profile or avoid
>>> running under an environment modified by /etc/profile.
>>
>> It doesn't add, actually - it replaces it.
>
> You're wrong. The Cygwin DLL at startup translates the Windows PATH
> variable. And this line in /etc/profile adds to it:
>
> PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$PATH
>
>

This is completely and totally true.

To verify it, all you have to do is open a bash prompt (Cygwin.bat,
mintty, rxvt, whatever) and then launch a cmd.exe or powershell.

Check the path in the bash prompt and you will see the cygwin stuff at
the beginning of it.

Check the path in the cmd.exe or powershell prompt which was run
*after* the bash script updated the path and you will see that it does
*not* include the cygwin paths.

It doesn't override what you have set anywhere but in cygwin's magic space.

-Jason

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