summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/base/task.lua12
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