fix(wsl): wsl should prefer the defined shell instead of powershell.exe (#1766)
This commit is contained in:
@@ -96,9 +96,6 @@ local function get_cmd_for_shell(input_cmd, shell_cmd)
|
|||||||
-- powershell then we can just run the cmd
|
-- powershell then we can just run the cmd
|
||||||
if shell:match("powershell") or shell:match("pwsh") then
|
if shell:match("powershell") or shell:match("pwsh") then
|
||||||
cmd = input_cmd
|
cmd = input_cmd
|
||||||
elseif fn.has("wsl") > 0 then
|
|
||||||
-- wsl: powershell.exe -Command 'command "/path"'
|
|
||||||
cmd = "powershell.exe -NoProfile -Command '" .. input_cmd:gsub("'", '"') .. "'"
|
|
||||||
elseif fn.has("win32") > 0 then
|
elseif fn.has("win32") > 0 then
|
||||||
cmd = 'powershell.exe -NoProfile -Command "' .. input_cmd:gsub('"', "'") .. '"'
|
cmd = 'powershell.exe -NoProfile -Command "' .. input_cmd:gsub('"', "'") .. '"'
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user