Skip to content

Commit

Permalink
[API] Don't produce window message if running via cli/API
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdallo committed Jul 17, 2021
1 parent 65d52db commit 27d7b27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/clojure_lsp/crawler.clj
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
(string/split sep))
(do
(log/error (format "Error while looking up classpath info in %s. Exit status %s. Error: %s" (str root-path) exit err))
(producer/window-show-message "Classpath lookup failed in clojure-lsp. Some features may not work correctly." :warning)
(producer/window-show-message "Classpath lookup failed in clojure-lsp. Some features may not work correctly." :warning)
[])))
(catch Exception e
(log/error e "Error while looking up classpath info in" (str root-path) (.getMessage e))
(log/error e (format "Error while looking up classpath info in %s" (str root-path)) (.getMessage e))
(producer/window-show-message "Classpath lookup failed in clojure-lsp. Some features may not work correctly." :warning)
[])))

Expand Down
2 changes: 1 addition & 1 deletion src/clojure_lsp/producer.clj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
(window-show-message {:message message :type type}))
([message-content]
(log/info message-content)
(let [client ^LanguageClient (:client @db/db)]
(when-let [client ^LanguageClient (:client @db/db)]
(->> message-content
(interop/conform-or-log ::interop/show-message)
(.showMessage client)))))
Expand Down

0 comments on commit 27d7b27

Please sign in to comment.