env and PATH
Andrey Repin
anrdaemon@yandex.ru
Thu Jan 9 07:31:30 GMT 2025
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 extension to the standard.
>>> That's Cygwin specific.
>>> It completely makes sense to convert cygwin paths to windows path when
>>> invoking windows programs, but it is not my case.
>> Then why TF you supply Windows paths to it?
> Because it is a windows program.
> And since I do not have cygwin paths, it does not make sense to convert them.
The apparent issue you are missing is that you are calling native app from
Cygwin environment.
Each have its own rules, and to have it working with minimal issues, you'd
need to satisfy both sides.
In specific case, PATH is a special environment variable for both sides, and
you have to correctly translate it from one side to the other.
> I wrote that it is not my case because my PATH does not have cygwin paths;
> it has windows paths.
cygpath helps. As you have figured out already.
I provided a wrapper script I use myself, you could add any massaging to it
that you feel necessary. Like `unset TERM` or PATH modifications.
--
With best regards,
Andrey Repin
Thursday, January 9, 2025 10:24:05
Sorry for my terrible english...
More information about the Cygwin
mailing list