diff options
| author | ruki <[email protected]> | 2017-05-20 00:42:05 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-05-20 00:42:05 +0800 |
| commit | ce27b8d4dfae08a01f473e7a5cfbb94f6e79c967 (patch) | |
| tree | 76cb0f63a16787f920c3dac016ad7b6f5c2d7250 /xmake/plugins/lua | |
| parent | c6876982657c8bf65b7e2a05fc1206b3aacc0ff8 (diff) | |
improve test script
Diffstat (limited to 'xmake/plugins/lua')
| -rw-r--r-- | xmake/plugins/lua/xmake.lua | 6 |
1 files changed, 3 insertions, 3 deletions
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 |
