Make no-project-needed set an atom so plugins can add to it.

This commit is contained in:
Phil Hagelberg 2010-02-13 09:31:51 -08:00
parent 21e5fc9b27
commit e4ae8b2bfd

View file

@ -51,7 +51,7 @@
(def aliases {"--help" "help" "-h" "help" "-?" "help" "-v" "version"
"--version" "version" "überjar" "uberjar"})
(def no-project-needed #{"new" "help" "version"})
(def no-project-needed (atom #{"new" "help" "version"}))
(defn resolve-task [task]
(let [task-ns (symbol (str "leiningen." task))
@ -69,7 +69,7 @@
(defn -main [& [task & args]]
(let [task (or (aliases task) task "help")
args (if (no-project-needed task)
args (if (@no-project-needed task)
args
(conj args (read-project)))
compile-path (:compile-path (first args))]