Skip to content

Commit 3efbd99

Browse files
committed
fix stderr print + print downloaded time
1 parent af084ce commit 3efbd99

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/leiningen/clojure_lsp/binary.clj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,18 @@
7676
(future
7777
(with-open [out-rdr ^BufferedReader (io/reader (:err p))]
7878
(loop []
79-
(when-let [line (.readLine out-rdr)]
80-
(println line)
81-
(recur)))))
79+
(binding [*out* *err*]
80+
(when-let [line (.readLine out-rdr)]
81+
(println line)
82+
(recur))))))
8283
@p))
8384

8485
(defn run! [args]
8586
(let [server-path (server-path)
8687
server-version (server-version)]
8788
(when-not (.exists server-path)
8889
(println "Downloading and caching clojure-lsp...")
89-
(download! server-path server-version)
90-
(println "Downloaded clojure-lsp!"))
90+
(let [t (System/currentTimeMillis)]
91+
(download! server-path server-version)
92+
(println (format "Downloaded clojure-lsp took %sms" (- (System/currentTimeMillis) t)))))
9193
(run-lsp! server-path args)))

0 commit comments

Comments
 (0)