summaryrefslogtreecommitdiff
path: root/xmake/plugins/lua/main.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-02-03 10:17:50 +0800
committerGitHub <[email protected]>2026-02-03 10:17:50 +0800
commitf99b99b2ae3cfeb47356e6542c393bba009f8583 (patch)
treee30417b6fbd7392390ed69b4e01b559a1ed4869a /xmake/plugins/lua/main.lua
parentb72e271e4ca2b59170819295eaa972ce149096b2 (diff)
Refactor script content handling in main.lua
Removed Windows-specific shell handling for script content.
Diffstat (limited to 'xmake/plugins/lua/main.lua')
-rw-r--r--xmake/plugins/lua/main.lua10
1 files changed, 0 insertions, 10 deletions
diff --git a/xmake/plugins/lua/main.lua b/xmake/plugins/lua/main.lua
index c7b5137ce..772faa2c6 100644
--- a/xmake/plugins/lua/main.lua
+++ b/xmake/plugins/lua/main.lua
@@ -51,16 +51,6 @@ function _get_script_from_stdin()
if script_content then
-- remove utf8 bom
script_content = script_content:ltrim(utf8.bom)
- local shell = os.shell()
- if shell == "cmd" or shell == "powershell" or shell == "pwsh" or is_host("windows") then
- local trimmed = script_content:trim()
- if trimmed:startswith('"') and trimmed:endswith('"') then
- script_content = trimmed:trim('"')
- else
- script_content = trimmed
- end
- end
-
if not script_content:find("function main", 1, true) then
script_content = "function main(...)\n" .. script_content .. "\nend"
end