fix(windows): fix invalid powershell separator during install

This commit is contained in:
Adam Wolski 2023-03-11 10:42:17 +01:00 committed by Amaan Qureshi
parent e6f9a4b7c3
commit 677dd11c6a

View file

@ -318,7 +318,11 @@ end
---@return string command
function M.make_directory_change_for_command(dir, command)
if fn.has "win32" == 1 then
return string.format("pushd %s & %s & popd", cmdpath(dir), command)
if vim.o.shell == "powershell" or vim.o.shell == "pwsh" then
return string.format("pushd %s ; %s ; popd", cmdpath(dir), command)
else
return string.format("pushd %s & %s & popd", cmdpath(dir), command)
end
else
return string.format("cd %s;\n %s", dir, command)
end