diff options
| author | ruki <[email protected]> | 2020-06-10 00:52:27 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-06-09 23:14:47 +0800 |
| commit | 2541fc0f29a2bf76dfa8b6f0f1389888330d198b (patch) | |
| tree | 9531ec960d89d4a7440011486758d2c180c0ec91 | |
| parent | 3ad919033e2b02477b6de67d25c7eaae216519ac (diff) | |
improve to show toolchains
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/tool/toolchain.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/core/sandbox/modules/import/core/tool/toolchain.lua b/xmake/core/sandbox/modules/import/core/tool/toolchain.lua index 83071811d..8f4202f2b 100644 --- a/xmake/core/sandbox/modules/import/core/tool/toolchain.lua +++ b/xmake/core/sandbox/modules/import/core/tool/toolchain.lua @@ -30,8 +30,10 @@ local raise = require("sandbox/modules/raise") -- get all toolchains list function sandbox_core_tool_toolchain.list() local names = table.copy(platform.toolchains()) - for name, _ in pairs(project.toolchains()) do - table.insert(names, name) + if os.isfile(os.projectfile()) then + for name, _ in pairs(project.toolchains()) do + table.insert(names, name) + end end return names end |
