diff options
| author | ruki <[email protected]> | 2024-04-19 00:45:30 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-04-19 00:45:30 +0800 |
| commit | 39f3156b82e02d6cf4514309d6887f30cc962602 (patch) | |
| tree | 1f1be3e3531f4f12c95f80c7c6cdd22174c91108 | |
| parent | f29ac30bf2e231f6753e0eea7a6026b188774f4e (diff) | |
fix toolchains for package
| -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 |
