Re: env and PATH

2025-01-17 Thread matthew patton via Cygwin
On 13/01/2025 09.59, Andrey Repin wrote: > But I know that the program is a windows program, thus a setting for>  >manually disabling the conversion made sense (at least in my head). You might find this bit useful. For example the AWS CLI binary is windoze and doesn't play nicely with unix-style p

Re: env and PATH

2025-01-13 Thread Federico Kircheis via Cygwin
mewhere else, thus a flag for env does might not make that much sense. Since POSIX says nothing about the interaction of env and PATH, Why it should? This is Cygwin specifics. and conversions are not described by the standard (as you confirmed), the behavior is expected because of what cygwin d

Re: env and PATH

2025-01-13 Thread Andrey Repin via Cygwin
nv don't know, what kind of program it is running. Runtime knows, env does not. Runtime does conversion, not env. > Since POSIX says nothing about the interaction of env and PATH, Why it should? This is Cygwin specifics. > and conversions are not described by the standard (as you con

Re: env and PATH

2025-01-11 Thread Marco Atzeri via Cygwin
On 20/12/2024 17:51, Federico Kircheis via Cygwin wrote: Hello to everyone, I've noticed that env seems to handle the environment variable PATH in a particular way - > cd /d; > env -i PATH='C:\Windows;C:\Windows\system32;' /c/Windows/System32/ WindowsPowerShell/v1.0/powershell.exe #

Re: env and PATH

2025-01-11 Thread Federico Kircheis via Cygwin
semantics and parsed my command according to that. Since POSIX says nothing about the interaction of env and PATH, and conversions are not described by the standard (as you confirmed), the behavior is expected because of what cygwin does, not because of POSIX. (and yes, I knew cygwin does the conve

Re: env and PATH

2025-01-08 Thread Andrey Repin via Cygwin
Greetings, Federico Kircheis! >> When starting non-POSIX app, Cygwin will translate $PATH back to native >> format. >>> I am not aware of any rule in POSIX that requires or recommends some >>> transformations for environment variables, in that sense, any transformation >>> is "unexpected" or an ex

Re: env and PATH

2025-01-07 Thread Federico Kircheis via Cygwin
Iterating and invoking an external program (cygpath) for every path takes some time. Depends on actual use case, it may be just a single invocation for entire list. I'm currently not on Windows, you mean it is possible to convert C:\Windows;C:\Windows\system32; to /cygdrive/c/windows:/cygdr

Re: env and PATH

2025-01-04 Thread Federico Kircheis via Cygwin
On 04/01/2025 21.13, Andrey Repin wrote: Greetings, Federico Kircheis! On 04/01/2025 02.41, Andrey Repin wrote: Greetings, Federico Kircheis! Hello to everyone, I've noticed that env seems to handle the environment variable PATH in a particular way - >> cd /d; >> env -i PATH='C:\

Re: env and PATH

2025-01-04 Thread Andrey Repin via Cygwin
Greetings, Federico Kircheis! > On 04/01/2025 02.41, Andrey Repin wrote: >> Greetings, Federico Kircheis! >> >> Hello to everyone, >> > >> I've noticed that env seems to handle the environment variable PATH in >> > >> a particular way >> > >> - >> >> cd /d; >> >> env -i PATH='C:\Windows;C

Re: env and PATH

2025-01-04 Thread Federico Kircheis via Cygwin
On 04/01/2025 02.41, Andrey Repin wrote: Greetings, Federico Kircheis! Hello to everyone, I've noticed that env seems to handle the environment variable PATH in a particular way - >> cd /d; >> env -i PATH='C:\Windows;C:\Windows\system32;' /c/Windows/System32/WindowsPowerShell

Re: env and PATH

2025-01-03 Thread Andrey Repin via Cygwin
Greetings, Federico Kircheis! > Hello to everyone, > I've noticed that env seems to handle the environment variable PATH in a > particular way > - >> cd /d; >> env -i PATH='C:\Windows;C:\Windows\system32;' >> /c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe > # in the powersh

Re: env and PATH

2025-01-02 Thread Federico Kircheis via Cygwin
On 02/01/2025 10.34, Federico Kircheis wrote: On 20/12/2024 23.15, Brian Inglis via Cygwin wrote: Hi Federico, Looks like non-Cygwin program launch is messing up PATH not on the current drive: $ cd /proc/cygdrive/d $ cat -A /proc/cygdrive/d/tmp/t.cmd echo %PATH%^M$ $ env -i PATH='C:\Windows;

Re: env and PATH

2025-01-02 Thread Federico Kircheis via Cygwin
On 20/12/2024 23.15, Brian Inglis via Cygwin wrote: Hi Federico, Looks like non-Cygwin program launch is messing up PATH not on the current drive: $ cd /proc/cygdrive/d $ cat -A /proc/cygdrive/d/tmp/t.cmd echo %PATH%^M$ $ env -i PATH='C:\Windows;C:\Windows\system32;' /bin/sh -c 'echo $PATH' C

Re: env and PATH

2024-12-20 Thread Brian Inglis via Cygwin
Hi Federico, Looks like non-Cygwin program launch is messing up PATH not on the current drive: $ cd /proc/cygdrive/d $ cat -A /proc/cygdrive/d/tmp/t.cmd echo %PATH%^M$ $ env -i PATH='C:\Windows;C:\Windows\system32;' /bin/sh -c 'echo $PATH' C:\Windows;C:\Windows\system32; $ env -i PATH='C:\Windo

env and PATH

2024-12-20 Thread Federico Kircheis via Cygwin
Hello to everyone, I've noticed that env seems to handle the environment variable PATH in a particular way - > cd /d; > env -i PATH='C:\Windows;C:\Windows\system32;' /c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe # in the powershell instance echo $env:PATH C;D:\Windows;C;D:\