diff options
| author | ruki <[email protected]> | 2016-02-28 20:24:13 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-02-28 20:24:13 +0800 |
| commit | d353b2984472824d0347e0e8a7ffb1112d6ebab2 (patch) | |
| tree | 1c077bd74855c0d24d04974f38d2c5ff011e584d /xmake/core/base/task.lua | |
| parent | a69f2cbab10ea8adaea09a5e883188cbd083707a (diff) | |
check on_task_run
Diffstat (limited to 'xmake/core/base/task.lua')
| -rw-r--r-- | xmake/core/base/task.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xmake/core/base/task.lua b/xmake/core/base/task.lua index abdd40569..9c7d01abd 100644 --- a/xmake/core/base/task.lua +++ b/xmake/core/base/task.lua @@ -184,7 +184,17 @@ function task.run(name) -- get the task info local taskinfo = tasks[name] if not taskinfo then - utils.error("unknown task: %s", name) + + -- trace + utils.error("task(\"%s\"): unknown task", name) + return false + end + + -- check + if not taskinfo.run then + + -- trace + utils.error("task(\"%s\"): no run script, please call on_task_run() first!", name) return false end |
