diff options
| author | Gabriel Holodak <gthepiper@gmail.com> | 2024-12-24 00:27:01 -0500 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2025-01-20 08:50:52 +0100 |
| commit | 82939d5941cc939c0291699c1f7ee7046221aa17 (patch) | |
| tree | 9b5483121141b60e6b738efa0e2719b971986797 /lua | |
| parent | fix: node selection at line start that ends injected region (diff) | |
| download | nvim-treesitter-82939d5941cc939c0291699c1f7ee7046221aa17.tar nvim-treesitter-82939d5941cc939c0291699c1f7ee7046221aa17.tar.gz nvim-treesitter-82939d5941cc939c0291699c1f7ee7046221aa17.tar.bz2 nvim-treesitter-82939d5941cc939c0291699c1f7ee7046221aa17.tar.lz nvim-treesitter-82939d5941cc939c0291699c1f7ee7046221aa17.tar.xz nvim-treesitter-82939d5941cc939c0291699c1f7ee7046221aa17.tar.zst nvim-treesitter-82939d5941cc939c0291699c1f7ee7046221aa17.zip | |
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.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/shell_command_selectors.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/nvim-treesitter/shell_command_selectors.lua b/lua/nvim-treesitter/shell_command_selectors.lua index 48f610169..79bdb763f 100644 --- a/lua/nvim-treesitter/shell_command_selectors.lua +++ b/lua/nvim-treesitter/shell_command_selectors.lua @@ -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) |
