From e052920b5644119e1fc7c791732b262245ca9d0f Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 18 May 2023 23:38:46 +0800 Subject: [PATCH] improve envs on windows #3752 --- xmake/core/base/os.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index dee65cbdc19..bb2ebec53d1 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -1135,7 +1135,9 @@ function os.getenvs() local p = line:find('=', 1, true) if p then local key = line:sub(1, p - 1):trim() - if os.host() == "windows" then + -- only translate Path to PATH on windows + -- @see https://github.com/xmake-io/xmake/issues/3752 + if os.host() == "windows" and key:lower() == "path" then key = key:upper() end local values = line:sub(p + 1):trim()