summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-06-28 10:39:37 +0800
committerruki <[email protected]>2017-06-28 10:39:37 +0800
commit6fd9b01f38b3770aeca720a58339fc330a7115cf (patch)
treea8fbf9e3a69e0e4d054eb63fb6b16153dcdced85
parentf71dd757c0294508d2e937d907bc6ec11f38f3ec (diff)
fix sandbox bind for project.check
-rw-r--r--xmake/core/sandbox/modules/import.lua10
-rw-r--r--xmake/core/sandbox/modules/import/core/project/project.lua2
-rw-r--r--xmake/core/sandbox/sandbox.lua1
3 files changed, 6 insertions, 7 deletions
diff --git a/xmake/core/sandbox/modules/import.lua b/xmake/core/sandbox/modules/import.lua
index a18a5231b..61c259c9f 100644
--- a/xmake/core/sandbox/modules/import.lua
+++ b/xmake/core/sandbox/modules/import.lua
@@ -103,7 +103,7 @@ function sandbox_import._loadfile(filepath, instance)
if not result then
return nil, errors
end
-
+
-- ok
return result, instance:script()
end
@@ -311,10 +311,10 @@ function sandbox_import.import(name, args)
-- init module directories
local modules_directories =
{
- rootdir -- load module from the given root directory first
- , path.join(global.directory(), "modules") -- load module from the user global modules directory
- , path.join(os.programdir(), "modules") -- load module from the extension modules directory
- , path.join(os.programdir(), "core/sandbox/modules/import") -- load module from the sandbox core modules directory
+ rootdir -- load module from the given root directory first
+ , path.join(global.directory(), "modules") -- load module from the user global modules directory
+ , path.join(os.programdir(), "modules") -- load module from the extension modules directory
+ , path.join(os.programdir(), "core/sandbox/modules/import") -- load module from the sandbox core modules directory
}
-- load module
diff --git a/xmake/core/sandbox/modules/import/core/project/project.lua b/xmake/core/sandbox/modules/import/core/project/project.lua
index c099ec61b..8225fcadd 100644
--- a/xmake/core/sandbox/modules/import/core/project/project.lua
+++ b/xmake/core/sandbox/modules/import/core/project/project.lua
@@ -66,7 +66,7 @@ function sandbox_core_project.check(force)
environment.enter("toolchains")
-- check all options
- ok, errors = process.runjobs(instance:bind(function (index) options[index]:check(force) end), #options, 4)
+ ok, errors = process.runjobs(instance:fork(function (index) options[index]:check(force) end):script(), #options, 4)
if not ok then
raise(errors)
end
diff --git a/xmake/core/sandbox/sandbox.lua b/xmake/core/sandbox/sandbox.lua
index dec8c0a78..a706e6da2 100644
--- a/xmake/core/sandbox/sandbox.lua
+++ b/xmake/core/sandbox/sandbox.lua
@@ -270,7 +270,6 @@ function sandbox:import()
-- ok
return module
-
end
-- get script from the given sandbox