delorie.com/archives/browse.cgi | search |
DMARC-Filter: | OpenDMARC Filter v1.4.2 delorie.com 50BJlgAQ1990862 |
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 50BJlgAQ1990862 |
Authentication-Results: | delorie.com; |
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=iB95Lc8R | |
X-Recipient: | archive-cygwin AT delorie DOT com |
DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 4B6AD385829B |
DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; |
s=default; t=1736624860; | |
bh=IRw/t7nLCDeinxqjoAjkcthiRKNYEZ5NAkDkv+KExMk=; | |
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: | |
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: | |
From; | |
b=iB95Lc8RclB3J4maknyNsJtRRLOqlmXwArnHNuO3KBbzdIwRvyq69n+EyDif/WcUT | |
k3jc414qEE1mqXbYHeFbE20dcr6yKyMFbv7rWKQ0LXJgks19sJr1y/vuBlOSpASRwR | |
RHuIz43M1SZoGLAs1jG6lCWF9x7pdjXpSe+XCAl8= | |
X-Original-To: | cygwin AT cygwin DOT com |
Delivered-To: | cygwin AT cygwin DOT com |
DMARC-Filter: | OpenDMARC Filter v1.4.2 sourceware.org 0F7C33858D3C |
ARC-Filter: | OpenARC Filter v1.0.0 sourceware.org 0F7C33858D3C |
ARC-Seal: | i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736624835; cv=none; |
b=AeP8D5nXHYIVK255402Xk449U5Uo06oGgzr8WliVz+LywsMGiDy5X61krFiyopty8eSHTvtw1/XqZs97aqkZbPwFVL3uI8rDDPhbDgrxHKFWrfV1dMpbuOdqmiOl98QBwpBEDNUlJqloGjFfiJmJDT4N9jqkwgvhjYqZ+qi0QfY= | |
ARC-Message-Signature: | i=1; a=rsa-sha256; d=sourceware.org; s=key; |
t=1736624835; c=relaxed/simple; | |
bh=RA5KJWelc5WvxtdpqBm7/2hiuJV5AgeV4OYGGGB2WN0=; | |
h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; | |
b=AYg369f/bgYAyh4siKHyubV/0ZLVX+FSxyn2OEcOtTviLGBQxHZ995QoBPY8tzHO9yZS7etvyJDmNHI+ZG5pC2Ya7jdf7qY3cdtI0IcDz5RE58qgnf8Rx0Qdpa1BLy1x4l3NXmXXYhTPWcmpPc9pyoe2Wn2+g0AVS0bh7iM/0tM= | |
ARC-Authentication-Results: | i=1; server2.sourceware.org |
DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 0F7C33858D3C |
Message-ID: | <9375d5cd-792e-45f4-958b-40521d15afd5@kircheis.it> |
Date: | Sat, 11 Jan 2025 20:47:10 +0100 |
MIME-Version: | 1.0 |
Subject: | Re: env and PATH |
To: | cygwin AT cygwin DOT com |
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> | |
<123712861 DOT 20250109103130 AT yandex DOT ru> | |
In-Reply-To: | <123712861.20250109103130@yandex.ru> |
X-Rspamd-Queue-Id: | 4YVpvM6yj6z9sZf |
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-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: | Federico Kircheis via Cygwin <cygwin AT cygwin DOT com> |
Reply-To: | Federico Kircheis <federico AT kircheis DOT it> |
Sender: | "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com> |
On 09/01/2025 08.31, Andrey Repin wrote: > 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. What do you mean? I'm perfectly aware that PATH is special, and why it is, I also wrote it in the first mail. I questioned the statement that the conversion is expected _because_ `env` expects POSIX 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 conversion from cygwin PATH to Windows PATH, so that was expected, I did not expect it to break a Windows PATH and to depend on the current drive) The main question of this thread was: "I noticed that PATH is converted, and cannot find a switch do disable this conversion. Is it possible to define an environment and use it as is, without having some implicit conversions?" I mean, there are other variables that have special meanings; all those that define a path. (Examples would be HOME, XDG_CACHE_HOME, XDG_DATA_HOME, ...) The answer seems to be no (which was what I feared). Thus special casing for some environment variables is necessary as there is no such switch. I saw PATH as particularly problematic because I was not aware of the option --path of cygpath. > 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. Attachment seems to be missing, but I think unsetting environment variables one by one, changing existing, and adding the missing, is too error-prone. Defining a "clean" environment once seems to have less chances to have some errors. -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |