diff options
| author | ruki <[email protected]> | 2017-06-06 22:55:31 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-06-06 22:55:31 +0800 |
| commit | 0a28fb2991e2617fe9b75df176608537e07fa35a (patch) | |
| tree | 2085924eaf171666591e106d09d336b050b1a6cc /xmake/core/base/interpreter.lua | |
| parent | 8aceb2b14e224cf3ed28ab6cd326b32897135b68 (diff) | |
cache import modules
Diffstat (limited to 'xmake/core/base/interpreter.lua')
| -rw-r--r-- | xmake/core/base/interpreter.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/core/base/interpreter.lua b/xmake/core/base/interpreter.lua index a22c35ed6..5c51b35e4 100644 --- a/xmake/core/base/interpreter.lua +++ b/xmake/core/base/interpreter.lua @@ -647,7 +647,8 @@ function interpreter:_script(script) script = function (...) -- import it - return import(modulename, {anonymous = true})(...) + _g._module = _g._module or import(modulename, {anonymous = true}) + return _g._module(...) end end |
