From ce27b8d4dfae08a01f473e7a5cfbb94f6e79c967 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 20 May 2017 00:42:05 +0800 Subject: improve test script --- xmake/plugins/lua/xmake.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xmake/plugins/lua/xmake.lua') diff --git a/xmake/plugins/lua/xmake.lua b/xmake/plugins/lua/xmake.lua index 2789bf26a..78cd176ab 100644 --- a/xmake/plugins/lua/xmake.lua +++ b/xmake/plugins/lua/xmake.lua @@ -60,16 +60,16 @@ task("lua") if os.isfile(script) then -- run the given lua script file (xmake lua /tmp/script.lua) - import(path.basename(script), {rootdir = path.directory(script)})(unpack(option.get("arguments") or {})) + import(path.basename(script), {rootdir = path.directory(script), anonymous = true})(unpack(option.get("arguments") or {})) elseif os.isfile(path.join(os.scriptdir(), "scripts", script .. ".lua")) then -- run builtin lua script (xmake lua echo "hello xmake") - import("scripts." .. script)(unpack(option.get("arguments") or {})) + import("scripts." .. script, {anonymous = true})(unpack(option.get("arguments") or {})) else -- run modules (xmake lua core.xxx.xxx) - print(import(script)(unpack(option.get("arguments") or {}))) + print(import(script, {anonymous = true})(unpack(option.get("arguments") or {}))) end else -- enter interactive mode -- cgit v1.3.1