Allow aliases to shadow task names. Fixes #660.
This commit is contained in:
parent
b6f90ac49e
commit
13608e8036
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue