summaryrefslogtreecommitdiff
path: root/xmake/core/base/path.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-29 22:49:37 +0800
committerruki <[email protected]>2026-03-29 22:49:41 +0800
commit1bccfc273af2b1d579d033324bca481e15c58653 (patch)
tree192697793bd61d48b4423da0ac4a1eab804d80dc /xmake/core/base/path.lua
parentf4513cc28aa778e1ad0d050511cc7e295fe81e32 (diff)
fix const limit on lua5.5
Diffstat (limited to 'xmake/core/base/path.lua')
-rw-r--r--xmake/core/base/path.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/xmake/core/base/path.lua b/xmake/core/base/path.lua
index 0d2dadfba..ee154147f 100644
--- a/xmake/core/base/path.lua
+++ b/xmake/core/base/path.lua
@@ -388,6 +388,7 @@ function path.splitenv(env_path)
-- see https://git.kernel.org/pub/scm/utils/dash/dash.git/tree/src/exec.c?h=v0.5.9.1&id=afe0e0152e4dc12d84be3c02d6d62b0456d68580#n173
-- no escape sequences, so `:` and `%` is invalid in environment variable
for _, v in ipairs(env_path:split(path.envsep(), { plain = true })) do
+ local v = v
-- flag for shells, style `<path>%<flag>`
local flag = v:find("%", 1, true)
if flag then
@@ -416,6 +417,7 @@ function path.joinenv(paths, envsep)
if xmake._HOST == "windows" then
local tab = {}
for _, v in ipairs(paths) do
+ local v = v
if v ~= "" then
if v:find(envsep, 1, true) then
v = '"' .. v .. '"'