delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/01/09/02:35:24

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 5097ZNei1081192
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 5097ZNei1081192
X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC4A83858C53
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EC4A83858C53
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736408104; cv=none;
b=UF7RPyfzFthq+HVUbi4sjVapeg6+QtdVbj8Vrk7J/ZKl+oELIp7Lf+Si7kvOXsJLZIyvc5XAGpnz3dYA0ajxM930hul5dWwdQOl7XJmjZMGQvQxeDwCotptgBgLrkbEU2tOJt1LteITM+oCj9KqV3u8YDK4r0Am5TTcpshs484A=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1736408104; c=relaxed/simple;
bh=CTaHAmKmlr4/tQf8oOhWvhWaIaA21v+eWGhESQtAofo=;
h=DKIM-Signature:Date:From:Message-ID:To:Subject:MIME-Version;
b=wKJmmMMNTCaw0UJum6Vwd2KAwpqgZSYxQ6oRL5MB7Gv0Qx8ht1tZ7usiqo+DGeq6MxqondbK7z2gGiJolQGLJTRCwIzIllTCSZi6UBM34D3V+jGWovIUkn8EbvGAeC4D03Dq4bvT/hV9O0OVLgL3qPO+gjWEKzIdMgX5n5hdmCM=
ARC-Authentication-Results: i=1; server2.sourceware.org
X-Yandex-Fwd: 1
Date: Thu, 9 Jan 2025 10:31:30 +0300
X-Mailer: The Bat! (v9.3.4) Professional
Message-ID: <123712861.20250109103130@yandex.ru>
To: Federico Kircheis <federico AT kircheis DOT it>, cygwin AT cygwin DOT com
Subject: Re: env and PATH
In-Reply-To: <dfce0589-5f52-408c-a8f9-f42771c724a3@kircheis.it>
References: <77a3709d-ec4d-497b-bf6c-75f29dc8c992 AT kircheis DOT it>
<1756102695 DOT 20250104044139 AT yandex DOT ru>
<21a99c98-1a16-4ffb-97f4-fa9480f7b02d AT kircheis DOT it>
<383539154 DOT 20250104231316 AT yandex DOT ru>
<dfce0589-5f52-408c-a8f9-f42771c724a3 AT kircheis DOT it>
MIME-Version: 1.0
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Andrey Repin via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Andrey Repin <anrdaemon AT yandex DOT ru>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

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


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019