diff options
| author | ruki <[email protected]> | 2020-08-02 20:23:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-08-02 20:23:03 +0800 |
| commit | 0641936cd7800e0ec27f953566e9ad7d2f743529 (patch) | |
| tree | cf78cd609e0927bdb8f395f676777b7cd68d0814 | |
| parent | db31246f1fa9d00cdc3d4bc5ed82213e46fa0d7d (diff) | |
fix show toolchains
| -rw-r--r-- | xmake/plugins/show/lists/toolchains.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/plugins/show/lists/toolchains.lua b/xmake/plugins/show/lists/toolchains.lua index 621d09295..15477afce 100644 --- a/xmake/plugins/show/lists/toolchains.lua +++ b/xmake/plugins/show/lists/toolchains.lua @@ -21,13 +21,16 @@ -- imports import("core.tool.toolchain") import("core.base.text") +import("core.project.config") +import("core.project.project") -- show all toolchains function main() + config.load() local tbl = {align = 'l', sep = " "} for _, name in ipairs(toolchain.list()) do - local t = toolchain.load(name) + local t = os.isfile(os.projectfile()) and project.toolchain(name) or toolchain.load(name) table.insert(tbl, {name, t:get("description")}) end print(text.table(tbl)) |
