diff options
| -rw-r--r-- | xmake/core/base/interpreter.lua | 7 | ||||
| -rw-r--r-- | xmake/core/project/project.lua | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/xmake/core/base/interpreter.lua b/xmake/core/base/interpreter.lua index 818ff9576..a92225711 100644 --- a/xmake/core/base/interpreter.lua +++ b/xmake/core/base/interpreter.lua @@ -748,13 +748,20 @@ end function interpreter:make(scope_kind, remove_repeat, enable_filter) -- get the results with the given scope + self._PENDING = true local ok, results = xpcall(interpreter._make, interpreter._traceback, self, scope_kind, remove_repeat, enable_filter) + self._PENDING = false if not ok then return nil, results end return results end +-- is pending? +function interpreter:pending() + return self._PENDING +end + -- get all loaded script files (xmake.lua) function interpreter:scriptfiles() assert(self and self._PRIVATE) diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index d6b6cb200..1a684d8bb 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -757,10 +757,9 @@ function project.interpreter() os = platform.os() , host = os.host() , subhost = os.subhost() - , prefix = "$(prefix)" , tmpdir = function () return os.tmpdir() end , curdir = function () return os.curdir() end - , scriptdir = function () return interp:scriptdir() end + , scriptdir = function () return interp:pending() and interp:scriptdir() or sandbox_os.scriptdir() end , globaldir = global.directory() , configdir = config.directory() , projectdir = project.directory() |
