From 2348b6b619c5adeed334917d16e1ddf9e4d026c3 Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Wed, 22 Aug 2012 12:04:17 -0700 Subject: [PATCH] Fix with-profile task to work from the base project rather than being additive. --- leiningen-core/src/leiningen/core/project.clj | 2 +- src/leiningen/with_profile.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/leiningen-core/src/leiningen/core/project.clj b/leiningen-core/src/leiningen/core/project.clj index 7ebc5eb7..f14dd5b7 100755 --- a/leiningen-core/src/leiningen/core/project.clj +++ b/leiningen-core/src/leiningen/core/project.clj @@ -310,7 +310,7 @@ (ssl/register-scheme (ssl/https-scheme context)) project)) -(defn- reset-profiles +(defn reset-profiles "Compute a fresh version of the project map with middleware applied, including and excluding the specified profiles." [project include-profiles & [exclude-profiles]] diff --git a/src/leiningen/with_profile.clj b/src/leiningen/with_profile.clj index 882e34ec..c82e20d5 100644 --- a/src/leiningen/with_profile.clj +++ b/src/leiningen/with_profile.clj @@ -6,7 +6,7 @@ "Apply the given task with a comma-separated profile list." [project profiles task-name & args] (let [profiles (map keyword (.split profiles ",")) - project (and project (project/merge-profiles project profiles)) + project (and project (project/reset-profiles project profiles)) task-name (main/lookup-alias task-name project)] (main/apply-task task-name project args)))