diff options
| author | ruki <[email protected]> | 2025-09-13 22:53:09 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-09-13 22:53:34 +0800 |
| commit | 8069f629429c9db558b5bff6274358535be3043b (patch) | |
| tree | 78e3ab84d0d44900cb87abe3b6b7677adfca6875 /xmake/modules/utils/run_script.lua | |
| parent | 8241b150316595df554dfeab99efca618eef7412 (diff) | |
fix run script
Diffstat (limited to 'xmake/modules/utils/run_script.lua')
| -rw-r--r-- | xmake/modules/utils/run_script.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/utils/run_script.lua b/xmake/modules/utils/run_script.lua index de625119f..a5ab2fa50 100644 --- a/xmake/modules/utils/run_script.lua +++ b/xmake/modules/utils/run_script.lua @@ -66,11 +66,11 @@ function _run_script(script, args, opt) -- run the given lua script file (xmake lua /tmp/script.lua) script_type, script_name = "given lua script file", path.relative(script) func = import(path.basename(script), {rootdir = path.directory(script), anonymous = true}) - elseif os.isfile(path.join(os.scriptdir(), "scripts", script .. ".lua")) then + elseif os.isfile(path.join(os.programdir(), "plugins", "lua", "scripts", script .. ".lua")) then -- run builtin lua script (xmake lua echo "hello xmake") script_type, script_name = "builtin lua script", script - func = import("scripts." .. script, {anonymous = true}) + func = import("scripts." .. script, {anonymous = true, rootdir = path.join(os.programdir(), "plugins", "lua")}) else -- attempt to find the builtin module |
