diff options
| author | Saikari <[email protected]> | 2026-02-01 14:25:14 +0300 |
|---|---|---|
| committer | Saikari <[email protected]> | 2026-02-01 14:25:14 +0300 |
| commit | 05dc5f8fbfd139cb9cbe1c6679b59aba9ae02dd4 (patch) | |
| tree | 17eff1523b9304fc6dbb335d955e42dd59e0c6de /xmake/plugins/lua/main.lua | |
| parent | 5313286703675d51f54cde0a8d0ea382619ae84c (diff) | |
refactor: wrap script content in a main function for better execution context
Diffstat (limited to 'xmake/plugins/lua/main.lua')
| -rw-r--r-- | xmake/plugins/lua/main.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xmake/plugins/lua/main.lua b/xmake/plugins/lua/main.lua index a945a64c1..0c0b44005 100644 --- a/xmake/plugins/lua/main.lua +++ b/xmake/plugins/lua/main.lua @@ -72,6 +72,7 @@ function main() end script_content = script_content:replace("\\n", "\n", {plain = true}):replace("\\r", "\r", {plain = true}) end + script_content = "function main(...)\n" .. script_content .. "\nend" script = os.tmpfile() .. ".lua" io.writefile(script, script_content) script_file_to_remove = script |
