diff options
| author | Opportunity <[email protected]> | 2020-01-20 22:18:58 +0800 |
|---|---|---|
| committer | Opportunity <[email protected]> | 2020-01-20 22:21:47 +0800 |
| commit | 08d00484b84526bf8b20f8ff9016ad2c0fc851ae (patch) | |
| tree | a5eac2509adfcd291e14472aaa8c364549a68fcd /xmake/plugins/lua | |
| parent | d3e45885b8fa8e905e061b9c14f0cc34ba35b5f5 (diff) | |
fix code style
Diffstat (limited to 'xmake/plugins/lua')
| -rw-r--r-- | xmake/plugins/lua/main.lua | 2 | ||||
| -rw-r--r-- | xmake/plugins/lua/xmake.lua | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/xmake/plugins/lua/main.lua b/xmake/plugins/lua/main.lua index 7586ab65a..c0ed6e3d0 100644 --- a/xmake/plugins/lua/main.lua +++ b/xmake/plugins/lua/main.lua @@ -26,7 +26,7 @@ import("core.sandbox.sandbox") -- get all lua scripts function scripts() local names = {} - local files = os.match(path.join(os.scriptdir(), "scripts/*.lua")) + local files = os.files(path.join(os.scriptdir(), "scripts/*.lua")) for _, file in ipairs(files) do table.insert(names, path.basename(file)) end diff --git a/xmake/plugins/lua/xmake.lua b/xmake/plugins/lua/xmake.lua index 7b7bb8dd3..23d00b145 100644 --- a/xmake/plugins/lua/xmake.lua +++ b/xmake/plugins/lua/xmake.lua @@ -52,7 +52,9 @@ task("lua") " - xmake lua core.xxx.xxx", " - xmake lua -c 'print(...)' hello xmake!" , values = function (complete, opt) - if not complete or opt.command or opt.list then return end + if not complete or opt.command or opt.list then + return + end return import("main.scripts")() end } |
