Allow aliases to shadow task names. Fixes #660.

This commit is contained in:
Phil Hagelberg 2012-06-24 22:06:28 -07:00
parent b6f90ac49e
commit 13608e8036

View file

@ -6,10 +6,9 @@
"Apply the given task with a comma-separated profile list." "Apply the given task with a comma-separated profile list."
[project profiles task-name & args] [project profiles task-name & args]
(let [profiles (map keyword (.split profiles ",")) (let [profiles (map keyword (.split profiles ","))
project (project/merge-profiles project profiles) project (update-in (project/merge-profiles project profiles)
task-name (or (@main/aliases task-name) [:aliases] (fnil dissoc {}) task-name)
(get (:aliases project) task-name) task-name (main/lookup-alias task-name project)]
task-name)]
(main/apply-task task-name project args))) (main/apply-task task-name project args)))
(defn ^:no-project-needed ^:higher-order with-profile (defn ^:no-project-needed ^:higher-order with-profile