From 4fa3ca927a032f57aaae44156ceeec6732c159f6 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 2 Mar 2016 21:06:09 +0800 Subject: add option and global module for sandbox --- xmake/core/base/task.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'xmake/core/base/task.lua') diff --git a/xmake/core/base/task.lua b/xmake/core/base/task.lua index cda0c3356..d58844862 100644 --- a/xmake/core/base/task.lua +++ b/xmake/core/base/task.lua @@ -80,7 +80,8 @@ function task._interpreter() -- init maps local maps = { - host = xmake._HOST + host = xmake._HOST + , globaldir = global.directory() } -- map it @@ -273,6 +274,14 @@ function task.run(name) return false end + -- load global + if not global.load() then + + -- trace + utils.error("load global configure failed!") + return false + end + -- run on_before, on_run, on_after local ok = true local on_scripts = {taskinfo.before, taskinfo.run, taskinfo.after} -- cgit v1.3.1