       (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"

      (try
       (apply (resolve-task task) args)
       (catch IllegalArgumentException _
         (exit-with-error (format "Wrong number of arguments to task %s."
                                  task)))))
    ;; In case tests or some other task started any:
    (shutdown-agents)))

;; So it doesn't need to be fully-qualified in project.clj
(with-ns 'clojure.core (use ['leiningen.core :only ['defproject]]))

(defn abort [msg]
  (println msg)
  (System/exit 1))

