Skip to content

Commit

Permalink
feat: using correct shell chain symbol for windows powershell (#262) (#…
Browse files Browse the repository at this point in the history
…265)

* using correct chain symbol when on powershell

* using correct exit_op on powershell

* add missing brackets

---------

Co-authored-by: HuSen <[email protected]>
  • Loading branch information
canh25xp and Civitasv authored Dec 22, 2024
1 parent be874b9 commit 0d2e24d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/cmake-tools/terminal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,8 @@ local get_command_handling_on_exit = function()
end

if osys.iswin32 then
exit_op = "%errorlevel%"
escape_rm = is_power_shell() and "Remove-Item " or "del /Q "
exit_op = is_power_shell() and "$LASTEXITCODE" or "%errorlevel%"
escape_rm = is_power_shell() and " Remove-Item " or " del /Q "
exit_code_file_path = exit_code_file_path:gsub("/", "\\")
lock_file_path = lock_file_path:gsub("/", "\\")
end
Expand Down

0 comments on commit 0d2e24d

Please sign in to comment.