From 2541fc0f29a2bf76dfa8b6f0f1389888330d198b Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 10 Jun 2020 00:52:27 +0800 Subject: improve to show toolchains --- xmake/core/sandbox/modules/import/core/tool/toolchain.lua | 6 ++++-- 1 file 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 -- cgit v1.3.1