Skip to content

Commit

Permalink
Fix tool detection order for lsp-unzip on windows (#3022) (#4472)
Browse files Browse the repository at this point in the history
It caused issues on windows if unzip was found on the PATH

Co-authored-by: Jen-Chieh Shen <[email protected]>
  • Loading branch information
Horrih and jcs090218 authored Sep 30, 2024
1 parent b635d67 commit 532d38b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.org
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
unified ~(lsp-interface INTERFACE ...)~ form. The per-interface forms are no
longer generated. *This is a breaking change.* (See #4430.)
* If asm-lsp is installed, lsp-asm won't try to download it to cache store
* Fix lsp-unzip on windows when unzip was found on the PATH

** 9.0.0
* Add language server config for QML (Qt Modeling Language) using qmlls.
Expand Down
5 changes: 4 additions & 1 deletion lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -8458,7 +8458,10 @@ archive (e.g. when the archive has multiple files)"
"Unzip script to unzip file.")

(defcustom lsp-unzip-script (lambda ()
(cond ((executable-find "unzip") lsp-ext-unzip-script)
(cond ((and (eq system-type 'windows-nt)
(executable-find "powershell"))
lsp-ext-pwsh-script)
((executable-find "unzip") lsp-ext-unzip-script)
((executable-find "powershell") lsp-ext-pwsh-script)
(t nil)))
"The script to unzip."
Expand Down

0 comments on commit 532d38b

Please sign in to comment.