Fix repo credentials when no credentials in url
Credentials were being overwritten with nil when there was no username or
password in the repository url. Fixes regression introduced in
a61d6a66a6
.
This commit is contained in:
parent
c11cdca61e
commit
7dc109df88
1 changed files with 6 additions and 5 deletions
|
@ -22,11 +22,12 @@
|
|||
|
||||
(defn add-auth-from-url
|
||||
[[id settings]]
|
||||
(if-let [url (utils/build-url id)]
|
||||
(let [user-info (.getUserInfo url)
|
||||
[username password] (and user-info (.split user-info ":"))]
|
||||
[id (assoc settings :username username :password password)])
|
||||
[id settings]))
|
||||
(let [url (utils/build-url id)
|
||||
user-info (and url (.getUserInfo url))
|
||||
[username password] (and user-info (.split user-info ":"))]
|
||||
(if username
|
||||
[id (assoc settings :username username :password password)]
|
||||
[id settings])))
|
||||
|
||||
(defn add-auth-interactively [[id settings]]
|
||||
(if (or (and (:username settings) (some settings [:password :passphrase
|
||||
|
|
Loading…
Reference in a new issue