We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1f917b commit f061713Copy full SHA for f061713
1 file changed
lua/cmake-tools/terminal.lua
@@ -551,6 +551,10 @@ local is_fish_shell = function()
551
return string.find(shell, "fish")
552
end
553
554
+local is_power_shell = function()
555
+ return vim.o.shell == "pwsh"
556
+end
557
+
558
---creates command that handles all of our post command stuff for on_exit handling
559
---@return string
560
local get_command_handling_on_exit = function()
@@ -567,7 +571,7 @@ local get_command_handling_on_exit = function()
567
571
568
572
if osys.iswin32 then
569
573
exit_op = "%errorlevel%"
570
- escape_rm = " del /Q "
574
+ escape_rm = is_power_shell() and "Remove-Item " or "del /Q "
575
exit_code_file_path = exit_code_file_path:gsub("/", "\\")
576
lock_file_path = lock_file_path:gsub("/", "\\")
577
0 commit comments