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

;; 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]
  (println msg)
  (System/exit 1))


  (let [task-ns (symbol (str "leiningen." task))
        task (symbol task)
        error-fn (fn [& _]
                   (abort
                    (format "%s is not a task. Use \"help\" to list all tasks."
                             task)))]
    (try
     (require task-ns)
