summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-05-18 23:38:46 +0800
committerruki <[email protected]>2023-05-18 23:38:46 +0800
commite052920b5644119e1fc7c791732b262245ca9d0f (patch)
treebeed2dbdcf08dbc3bd3aed942dfbec4e2c1f6b84
parent3bc9b2b0a6344201baf2ffa0662df23c03a8cdf2 (diff)
improve envs on windows #3752
-rw-r--r--xmake/core/base/os.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index dee65cbdc..bb2ebec53 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()