diff options
| -rw-r--r-- | xmake/modules/private/action/require/impl/actions/install.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/modules/private/action/require/impl/actions/install.lua b/xmake/modules/private/action/require/impl/actions/install.lua index 2aad2ed2a..ade7eb625 100644 --- a/xmake/modules/private/action/require/impl/actions/install.lua +++ b/xmake/modules/private/action/require/impl/actions/install.lua @@ -334,10 +334,12 @@ function _enter_package_testenvs(package) local platform_inst = platform.load(package:plat(), package:arch()) toolchains = platform_inst:toolchains() for _, toolchain_inst in ipairs(toolchains) do - local runenvs = toolchain_inst:runenvs() - if runenvs and runenvs.PATH then - local envs = {PATH = runenvs.PATH} - os.addenvs(envs) + if toolchain_inst:check() then + local runenvs = toolchain_inst:runenvs() + if runenvs and runenvs.PATH then + local envs = {PATH = runenvs.PATH} + os.addenvs(envs) + end end end end |
