Skip to content
Browse files

Minor cleanup of make-repository.

  • Loading branch information...
1 parent f5064be commit 8eb54a913e2fac6db091d9f22f31d6238eaca1a3 @technomancy committed
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/leiningen/deps.clj
14 src/leiningen/deps.clj
@@ -36,13 +36,13 @@
(defn make-repository [[id settings]]
(let [repo (RemoteRepository.)]
(.setId repo id)
- (cond
- (string? settings) (.setUrl repo settings)
- (map? settings) (do (.setUrl repo (:url settings))
- (let [server (doto (Server.)
- (.setUsername (:username settings))
- (.setPassword (:password settings)))]
- (.addAuthentication repo (Authentication. server)))))
+ (if (string? settings)
+ (.setUrl repo settings)
+ (let [{:keys [url username password]}]
+ (.setUrl repo url)
+ (.addAuthentication repo (Authentication. (doto (Server.)
+ (.setUsername username)
+ (.setPassword password))))))
(defn get-repository-list [project]

0 comments on commit 8eb54a9

Please sign in to comment.
Something went wrong with that request. Please try again.