Browse files

Allow to pass optional args to the --swank task.

  • Loading branch information...
mtyaka committed Nov 22, 2010
1 parent 35729bf commit f401d668d88ab47e99a1781f40a65ac29567581c
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/leiningen/oneoff.clj
@@ -113,11 +113,11 @@ for a one-off project."
(defn start-repl-server [script]
(leiningen.repl/repl (oneoff-project script)))
-(defn start-swank-server [script]
+(defn start-swank-server [script & args]
(if lein-swank-ns
(if swank-form-var
(let [swank-fn (ns-resolve lein-swank-ns 'swank)]
- (swank-fn (oneoff-project script)))
+ (apply swank-fn (oneoff-project script) args))
(abort "The oneoff swank task only works with
swank-clojure 1.3.0-SNAPSHOT or newer."))
(abort "You'll need to install swank-clojure as a user plugin
@@ -141,7 +141,7 @@ See for more information."
("--exec" "-e") (apply execute-script script args)
("--repl" "-r") (start-repl-server script)
("--classpath" "-c") (print-classpath script)
- ("--swank" "-s") (start-swank-server script)
+ ("--swank" "-s") (apply start-swank-server script args)
(apply oneoff "--exec" cmd script args)))
(oneoff "--exec" script))

0 comments on commit f401d66

Please sign in to comment.