Rename exit-with-error to abort.
This commit is contained in:
parent
83ab2890b0
commit
66b4ed91e2
1 changed files with 6 additions and 6 deletions
|
@ -34,7 +34,7 @@
|
|||
;; So it doesn't need to be fully-qualified in project.clj
|
||||
(with-ns 'clojure.core (use ['leiningen.core :only ['defproject]]))
|
||||
|
||||
(defn exit-with-error [msg]
|
||||
(defn abort [msg]
|
||||
(println msg)
|
||||
(System/exit 1))
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
|||
(load-file file)
|
||||
project
|
||||
(catch java.io.FileNotFoundException _
|
||||
(exit-with-error "No project.clj found in this directory."))))
|
||||
(abort "No project.clj found in this directory."))))
|
||||
([] (read-project "project.clj")))
|
||||
|
||||
(def aliases {"--help" "help" "-h" "help" "-?" "help"
|
||||
|
@ -57,7 +57,7 @@
|
|||
(let [task-ns (symbol (str "leiningen." task))
|
||||
task (symbol task)
|
||||
error-fn (fn [& _]
|
||||
(exit-with-error
|
||||
(abort
|
||||
(format "%s is not a task. Use \"help\" to list all tasks."
|
||||
task)))]
|
||||
(try
|
||||
|
@ -78,7 +78,7 @@
|
|||
(try
|
||||
(apply (resolve-task task) args)
|
||||
(catch IllegalArgumentException _
|
||||
(exit-with-error (format "Wrong number of arguments to task %s."
|
||||
(abort (format "Wrong number of arguments to task %s."
|
||||
task)))))
|
||||
;; In case tests or some other task started any:
|
||||
(shutdown-agents)))
|
||||
|
|
Loading…
Reference in a new issue