diff options
| author | A2va <[email protected]> | 2023-11-30 22:15:01 +0100 |
|---|---|---|
| committer | A2va <[email protected]> | 2023-11-30 22:15:01 +0100 |
| commit | 522dac17e58f964da97499724189e7e0f5bf57e9 (patch) | |
| tree | 83e6e5d0f955b4d344ce4a2555433fc56c218311 | |
| parent | 13c1fee798f96df6fc6043a913b87e5e4109f2c0 (diff) | |
insert only PATH values
| -rw-r--r-- | xmake/modules/private/action/run/runenvs.lua | 14 |
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 |
