Skip to content

Commit 3de6484

Browse files
committed
Throw an error if the language directory doesn't exists
1 parent 4a5af31 commit 3de6484

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lsp-sonarlint.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ e.g. `-Xmx1024m`."
9494
:group 'lsp-sonarlint
9595
:type 'string)
9696

97-
(add-to-list 'load-path (concat (file-name-directory load-file-name) "languages"))
97+
(let ((languages-directory-path (concat (file-name-directory load-file-name) "languages")))
98+
(if (file-directory-p languages-directory-path)
99+
(add-to-list 'load-path languages-directory-path)
100+
(error "There were and error with the `load-file-name` function")))
98101

99102
(defun lsp-sonarlint--plugin-list ()
100103
"Check for the enabled extensions and return a path list.

0 commit comments

Comments
 (0)