We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ee8846 commit e9f12d8Copy full SHA for e9f12d8
plugin/src/main/scala/org/scalafmt/sbt/ScalafmtPlugin.scala
@@ -158,9 +158,10 @@ object ScalafmtPlugin extends AutoPlugin {
158
val repositories = resolvers.collect { case r: MavenRepository =>
159
r.root
160
}
161
- val repoCredentials = credentials.map { x =>
162
- val cred = Credentials.toDirect(x)
163
- new RepositoryCredential(cred.host, cred.userName, cred.passwd)
+ val repoCredentials = credentials.flatMap { c =>
+ Try(Credentials.toDirect(c)).toOption.map { dc =>
+ new RepositoryCredential(dc.host, dc.userName, dc.passwd)
164
+ }
165
166
167
log.debug(
0 commit comments