summaryrefslogtreecommitdiff
path: root/xmake/core/project/task.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-04-11 14:08:47 +0800
committerruki <[email protected]>2016-04-11 14:08:47 +0800
commit833bfb207b3f924eaa81feb496cf74e6223d0041 (patch)
tree0b1774ba14cbe63ecb6eb347deea19975f2c8554 /xmake/core/project/task.lua
parent71296f55db2d5b0a9249592c3428797708cd0683 (diff)
add new tool module
Diffstat (limited to 'xmake/core/project/task.lua')
-rw-r--r--xmake/core/project/task.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/core/project/task.lua b/xmake/core/project/task.lua
index 22cee9714..98cf00454 100644
--- a/xmake/core/project/task.lua
+++ b/xmake/core/project/task.lua
@@ -175,7 +175,7 @@ function task._interpreter()
, "before")
-- set filter
- interp:filter_set(filter.init(function (variable)
+ interp:filter_set(filter.new(function (variable)
-- check
assert(variable)
@@ -188,6 +188,7 @@ function task._interpreter()
local maps =
{
host = xmake._HOST
+ , nuldev = xmake._NULDEV
, tmpdir = os.tmpdir()
, curdir = os.curdir()
, globaldir = global.directory()
@@ -239,7 +240,7 @@ function task._bind(tasks)
if type(opt) == "function" then
-- make sandbox instance with the given script
- local instance, errors = sandbox.new(opt, interp)
+ local instance, errors = sandbox.new(opt, interp:filter(), interp:rootdir())
if not instance then
return false, errors
end
@@ -271,7 +272,7 @@ function task._bind(tasks)
if type(description) == "function" then
-- make sandbox instance with the given script
- local instance, errors = sandbox.new(description, interp)
+ local instance, errors = sandbox.new(description, interp:filter(), interp:rootdir())
if not instance then
return false, errors
end