diff options
| author | ruki <[email protected]> | 2019-08-03 11:10:49 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-08-03 11:10:49 +0800 |
| commit | e3bda5c006d6e35eb029844be29942451849247d (patch) | |
| tree | 44a5121380125ac7c1c78f3bd09b9c82ca6a8c88 /xmake/core/main.lua | |
| parent | 83033bdaea875873264396c80c226359cf947588 (diff) | |
improve to show help
Diffstat (limited to 'xmake/core/main.lua')
| -rw-r--r-- | xmake/core/main.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xmake/core/main.lua b/xmake/core/main.lua index 4c8606184..ed8153517 100644 --- a/xmake/core/main.lua +++ b/xmake/core/main.lua @@ -48,7 +48,14 @@ local menu = -- the tasks: xmake [task] , function () - return task.menu(table.join(task.tasks(), project.tasks())) + local tasks = task.tasks() or {} + local ok, protasks_or_errors = pcall(project.tasks) + if ok then + table.join2(tasks, protasks_or_errors) + else + utils.cprint("${dim}%s", protasks_or_errors) + end + return task.menu(tasks) end } |
