Skip to content

Commit c1997dc

Browse files
authored
fix[lsp-fsharp]: change permissions of fsac files (#3070)
* fix[lsp-fsharp]: change permissions of fsac files * chore: remove progn and replace message to lsp--info log
1 parent 0b74c79 commit c1997dc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

clients/lsp-fsharp.el

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,15 @@ current runtime."
205205
"fsautocomplete.netcore.zip"
206206
"fsautocomplete.zip")))
207207

208+
(defun lsp-fsharp--change-permissions (install-dir-full)
209+
(unless (eq system-type 'windows-nt) ; Windows does not have chmod
210+
(lsp--info "Altering permissions")
211+
(dolist (file (directory-files-recursively install-dir-full ""))
212+
(if (file-directory-p file)
213+
(chmod file #o755)
214+
(chmod file #o644)))
215+
(lsp--info "Finished altering permissions")))
216+
208217
(defun lsp-fsharp--fsac-install (_client callback _error-callback _update?)
209218
"Download the latest version of fsautocomplete and extract it to `lsp-fsharp-server-install-dir'."
210219
(let* ((temp-file (make-temp-file "fsautocomplete" nil ".zip"))
@@ -216,6 +225,7 @@ current runtime."
216225
(server-download-url (lsp-fsharp--server-download-url latest-version)))
217226
(url-copy-file server-download-url temp-file t)
218227
(shell-command unzip-script)
228+
(lsp-fsharp--change-permissions install-dir-full)
219229
(shell-command (format "%s %s --version" (lsp-fsharp--fsac-runtime-cmd) (lsp-fsharp--fsac-cmd)))
220230
(funcall callback)))
221231

0 commit comments

Comments
 (0)