Skip to content
Browse files

Handle malformed :port option gracefully.

  • Loading branch information...
1 parent d4d6548 commit d6d773309997885a035fb78f0d4d9fb3e49e60bd Baishampayan Ghose committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/leiningen/repl.clj
View
5 src/leiningen/repl.clj
@@ -133,7 +133,10 @@
[opts]
(when-let [port (first
(for [[i o] (map-indexed vector opts) :when (= o ":port")]
- (nth opts (inc i))))]
+ (try
+ (nth opts (inc i))
+ (catch Exception _
+ nil))))]
(Integer. port)))
(defn ^:no-project-needed repl

0 comments on commit d6d7733

Please sign in to comment.
Something went wrong with that request. Please try again.