Revert "Apply profiles from middleware in main"

This reverts commit fe1be7d2dc.

Conflicts:
	leiningen-core/src/leiningen/core/main.clj
	leiningen-core/src/leiningen/core/project.clj
This commit is contained in:
Phil Hagelberg 2014-09-05 20:28:17 -07:00
parent e434741df3
commit a9cf70e160
2 changed files with 10 additions and 15 deletions

View file

@ -352,15 +352,13 @@ Get the latest version of Leiningen at http://leiningen.org or by executing
[& raw-args]
(try
(user/init)
(let [project (binding [project/*suppress-profile-warnings* true]
(if (.exists (io/file *cwd* "project.clj"))
(project/read (str (io/file *cwd* "project.clj")))
(-> (project/make {:eval-in :leiningen :prep-tasks []
:source-paths ^:replace []
:resource-paths ^:replace []
:test-paths ^:replace []})
(project/init-project))))
project (project/set-profiles project [:default])]
(let [project (if (.exists (io/file *cwd* "project.clj"))
(project/read (str (io/file *cwd* "project.clj")))
(-> (project/make {:eval-in :leiningen :prep-tasks []
:source-paths ^:replace []
:resource-paths ^:replace []
:test-paths ^:replace []})
(project/init-project)))]
(when (:min-lein-version project) (verify-min-version project))
(configure-http)
(resolve-and-apply project raw-args))

View file

@ -532,8 +532,6 @@
project
profiles))
(def ^:internal ^:dynamic *suppress-profile-warnings* nil)
(defn- lookup-profile*
"Lookup a profile in the given profiles map, warning when the profile doesn't
exist. Recurse whenever a keyword or vector is found, combining all profiles
@ -541,10 +539,9 @@
[profiles profile]
(cond (keyword? profile)
(let [result (get profiles profile)]
(when-not (or result *suppress-profile-warnings*
(#{:provided :dev :user :test :base :default
:production :system :repl :downstream}
profile) )
(when-not (or result (#{:provided :dev :user :test :base :default
:production :system :repl :downstream}
profile))
(warn "Warning: profile" profile "not found."))
(lookup-profile* profiles result))