Permalink
Browse files

include :version-string in nREPL version map

  • Loading branch information...
1 parent ac95dc7 commit 0b8b06b622e3a2f9765f43fac53d47d9fe27feff @cemerick cemerick committed Nov 13, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/main/clojure/clojure/tools/nrepl.clj
View
10 src/main/clojure/clojure/tools/nrepl.clj
@@ -227,7 +227,9 @@
version
(when-let [in (.getResourceAsStream (class connect) "/clojure/tools/nrepl/version.txt")]
(with-open [^java.io.BufferedReader reader (io/reader in)]
- (->> (.readLine reader)
- (re-find #"(\d+)\.(\d+)\.(\d+)-?(.*)")
- rest
- (zipmap [:major :minor :incremental :qualifier])))))
+ (let [version-string (-> reader .readLine .trim)]
+ (assoc (->> version-string
+ (re-find #"(\d+)\.(\d+)\.(\d+)-?(.*)")
+ rest
+ (zipmap [:major :minor :incremental :qualifier]))
+ :version-string version-string)))))

0 comments on commit 0b8b06b

Please sign in to comment.