Skip to content

Commit

Permalink
Allow the task to work outside of projects.
Browse files Browse the repository at this point in the history
  • Loading branch information
Raynes committed Feb 7, 2012
1 parent 9584b85 commit c68b07b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/leiningen/repl.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
[leiningen.core.classpath :as classpath]))

(defn- start-server [project ack-port]
(eval/eval-in-project project
`(clojure.tools.nrepl/start-server 0 ~ack-port)
'(require 'clojure.tools.nrepl)))
(if project
(eval/eval-in-project project
`(clojure.tools.nrepl/start-server 0 ~ack-port)
'(require 'clojure.tools.nrepl))
(nrepl/start-server 0 ack-port)))

(def lein-repl-server (delay (nrepl/start-server)))

(defn repl
(defn ^:no-project-needed repl
([] (repl nil))
([project]
(nrepl/reset-ack-port!)
Expand Down

0 comments on commit c68b07b

Please sign in to comment.