Skip to content
This repository
Browse code

Handle malformed :port option gracefully.

  • Loading branch information...
commit d6d773309997885a035fb78f0d4d9fb3e49e60bd 1 parent d4d6548
authored November 26, 2012

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  src/leiningen/repl.clj
5  src/leiningen/repl.clj
@@ -133,7 +133,10 @@
133 133
   [opts]
134 134
   (when-let [port (first
135 135
                    (for [[i o] (map-indexed vector opts) :when (= o ":port")]
136  
-                     (nth opts (inc i))))]
  136
+                     (try
  137
+                       (nth opts (inc i))
  138
+                       (catch Exception _
  139
+                         nil))))]
137 140
     (Integer. port)))
138 141
 
139 142
 (defn ^:no-project-needed repl

0 notes on commit d6d7733

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