summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2016-05-05 09:53:35 +0800
committerruki <[email protected]>2016-05-05 09:53:35 +0800
commita8a90d7a973e5185a0e5af6d8e86dab1ce4aa862 (patch)
tree73a7cf6a40163d90e8ff41a0f3e9badeaaec3572
parentfbeb9a60df925536d6c23c0db1b12b50e6a51975 (diff)
fix enter subdirs scope error bug
-rw-r--r--xmake/core/base/interpreter.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/core/base/interpreter.lua b/xmake/core/base/interpreter.lua
index f396e4fdf..b105b3423 100644
--- a/xmake/core/base/interpreter.lua
+++ b/xmake/core/base/interpreter.lua
@@ -229,6 +229,9 @@ function interpreter:_api_builtin_add_subdirfiles(isdirs, ...)
-- bind public scope
setfenv(script, self._PUBLIC)
+ -- clear the current scope, force to enter root scope
+ self._PRIVATE._SCOPES._CURRENT = nil
+
-- done interpreter
local ok, errors = xpcall(script, interpreter._traceback)
if not ok then