Browse files

Merge pull request #864 from ghoseb/master

Minor doc & error handling enhancements.
  • Loading branch information...
Michael Klishin
Michael Klishin committed Nov 26, 2012
2 parents d4d6548 + 58e862a commit f214cf8e52589123d7d3c260c6e78611e8bb3186
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/leiningen/repl.clj
@@ -133,7 +133,10 @@
(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
@@ -148,8 +151,9 @@ inside of a project, it will be run in the context of that classpath.
If the command is run outside of a project, it'll be standalone and
the classpath will be that of Leiningen.
-USAGE: lein repl :headless
+USAGE: lein repl :headless [:port port]
This will launch an nREPL server and wait, rather than connecting reply to it.
+If :port is specified, the port given is used instead of a random one.
USAGE: lein repl :connect [host:]port
Connects to the nREPL server running at the given host (defaults to localhost)

0 comments on commit f214cf8

Please sign in to comment.