Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor cleanup of make-repository.

  • Loading branch information...
commit 8eb54a913e2fac6db091d9f22f31d6238eaca1a3 1 parent f5064be
@technomancy authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/leiningen/deps.clj
View
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))))))
repo))
(defn get-repository-list [project]
Please sign in to comment.
Something went wrong with that request. Please try again.