Skip to content

Commit 532d38b

Browse files
Horrihjcs090218
andauthored
Fix tool detection order for lsp-unzip on windows (#3022) (#4472)
It caused issues on windows if unzip was found on the PATH Co-authored-by: Jen-Chieh Shen <jcs090218@gmail.com>
1 parent b635d67 commit 532d38b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
unified ~(lsp-interface INTERFACE ...)~ form. The per-interface forms are no
1919
longer generated. *This is a breaking change.* (See #4430.)
2020
* If asm-lsp is installed, lsp-asm won't try to download it to cache store
21+
* Fix lsp-unzip on windows when unzip was found on the PATH
2122

2223
** 9.0.0
2324
* Add language server config for QML (Qt Modeling Language) using qmlls.

lsp-mode.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8458,7 +8458,10 @@ archive (e.g. when the archive has multiple files)"
84588458
"Unzip script to unzip file.")
84598459

84608460
(defcustom lsp-unzip-script (lambda ()
8461-
(cond ((executable-find "unzip") lsp-ext-unzip-script)
8461+
(cond ((and (eq system-type 'windows-nt)
8462+
(executable-find "powershell"))
8463+
lsp-ext-pwsh-script)
8464+
((executable-find "unzip") lsp-ext-unzip-script)
84628465
((executable-find "powershell") lsp-ext-pwsh-script)
84638466
(t nil)))
84648467
"The script to unzip."

0 commit comments

Comments
 (0)