diff options
| author | ruki <[email protected]> | 2017-06-28 10:39:37 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-06-28 10:39:37 +0800 |
| commit | 6fd9b01f38b3770aeca720a58339fc330a7115cf (patch) | |
| tree | a8fbf9e3a69e0e4d054eb63fb6b16153dcdced85 | |
| parent | f71dd757c0294508d2e937d907bc6ec11f38f3ec (diff) | |
fix sandbox bind for project.check
| -rw-r--r-- | xmake/core/sandbox/modules/import.lua | 10 | ||||
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/project/project.lua | 2 | ||||
| -rw-r--r-- | xmake/core/sandbox/sandbox.lua | 1 |
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 |
