Skip to content

Commit

Permalink
Merge pull request #864 from ghoseb/master
Browse files Browse the repository at this point in the history
Minor doc & error handling enhancements.
  • Loading branch information
Michael Klishin committed Nov 26, 2012
2 parents d4d6548 + 58e862a commit f214cf8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/leiningen/repl.clj
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit f214cf8

Please sign in to comment.