From 677dd11c6a31bfcf162ca113b9348f0af6b44bea Mon Sep 17 00:00:00 2001 From: Adam Wolski Date: Sat, 11 Mar 2023 10:42:17 +0100 Subject: fix(windows): fix invalid powershell separator during install --- lua/nvim-treesitter/shell_command_selectors.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/nvim-treesitter/shell_command_selectors.lua b/lua/nvim-treesitter/shell_command_selectors.lua index 353b30f26..e90cb81c9 100644 --- a/lua/nvim-treesitter/shell_command_selectors.lua +++ b/lua/nvim-treesitter/shell_command_selectors.lua @@ -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 -- cgit v1.2.3-70-g09d2