mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-07 22:10:01 -04:00
fix(install): preserve command return code on Windows
`:TSInstallSync` relies on the `:system()` command to set `v:shell_error` when an error code is returned during installation. On Windows, the error code was always overwritten by `popd`'s return code.
This commit is contained in:
parent
8acafab2bc
commit
82939d5941
1 changed files with 2 additions and 2 deletions
|
|
@ -353,9 +353,9 @@ end
|
|||
function M.make_directory_change_for_command(dir, command)
|
||||
if fn.has "win32" == 1 then
|
||||
if string.find(vim.o.shell, "cmd") ~= nil then
|
||||
return string.format("pushd %s & %s & popd", cmdpath(dir), command)
|
||||
return string.format("pushd %s & %s", cmdpath(dir), command)
|
||||
else
|
||||
return string.format("pushd %s ; %s ; popd", cmdpath(dir), command)
|
||||
return string.format("pushd %s ; %s", cmdpath(dir), command)
|
||||
end
|
||||
else
|
||||
return string.format("cd %s;\n%s", dir, command)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue