summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/private/action/run/runenvs.lua14
1 files changed, 4 insertions, 10 deletions
diff --git a/xmake/modules/private/action/run/runenvs.lua b/xmake/modules/private/action/run/runenvs.lua
index e8d3d8e4c..1a7ba05ac 100644
--- a/xmake/modules/private/action/run/runenvs.lua
+++ b/xmake/modules/private/action/run/runenvs.lua
@@ -59,16 +59,10 @@ function _make_runpath_on_windows(target)
insert_target(dep)
end
for _, toolchain in ipairs(target:toolchains()) do
- local runenvs = toolchain:get("runenvs")
- if runenvs then
- for _, runenv in pairs(runenvs) do
- if type(runenv) == "table" then
- for _, env in ipairs(runenv) do
- insert(env)
- end
- else
- insert(runenv)
- end
+ local runenvs = toolchain:runenvs()
+ if runenvs and runenvs.PATH then
+ for _, env in ipairs(path.splitenv(runenvs.PATH)) do
+ insert(env)
end
end
end