Pick prioritized value in add-repo if there is one
This commit is contained in:
parent
cd52531897
commit
120c54ab3c
1 changed files with 5 additions and 4 deletions
|
@ -171,11 +171,12 @@
|
||||||
(meta repos)))
|
(meta repos)))
|
||||||
|
|
||||||
(defn- add-repo [repos [id opts :as repo]]
|
(defn- add-repo [repos [id opts :as repo]]
|
||||||
;; TODO - we completely ignore metadata here. Should follow
|
|
||||||
;; ^:replace/^:displace conventions and merge metadata
|
|
||||||
(update-first repos #(= id (first %))
|
(update-first repos #(= id (first %))
|
||||||
(fn [[_ existing]]
|
(fn [[_ existing :as original]]
|
||||||
[id (meta-merge existing opts)])))
|
(if (different-priority? repo original)
|
||||||
|
(pick-prioritized repo original)
|
||||||
|
(with-meta [id (meta-merge existing opts)]
|
||||||
|
(merge (meta original) (meta repo)))))))
|
||||||
|
|
||||||
(def empty-dependencies
|
(def empty-dependencies
|
||||||
(with-meta [] {:reduce add-dep}))
|
(with-meta [] {:reduce add-dep}))
|
||||||
|
|
Loading…
Reference in a new issue