Skip to content

Commit

Permalink
Prefer repository credentials to host credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
rtimush committed Dec 21, 2021
1 parent 4d15e61 commit 380675c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ object RepositoryAuthentication {
repositoryId: String,
authentications: Seq[RepositoryAuthentication]
): Option[RepositoryAuthentication] =
authentications.find(a => a.host == Some(host) || a.repositoryId == Some(repositoryId))
authentications
.find(a.repositoryId == Some(repositoryId))
.orElse(authentications.find(a => a.host == Some(host)))

}

0 comments on commit 380675c

Please sign in to comment.