Skip to content

Commit 1115c3d

Browse files
committed
add credentials only if they exist, prevents warnings
1 parent 894fc14 commit 1115c3d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/scala/ScalaModulePlugin.scala

+4-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ object ScalaModulePlugin extends Plugin {
5858
if (version.value.trim.endsWith("SNAPSHOT")) Resolver.sonatypeRepo("snapshots")
5959
else Opts.resolver.sonatypeStaging
6060
),
61-
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
61+
credentials ++= {
62+
val file = Path.userHome / ".ivy2" / ".credentials"
63+
if (file.exists) List(file) else Nil
64+
},
6265

6366
publishMavenStyle := true,
6467
scmInfo := Some(ScmInfo(url(s"https://github.com/scala/${repoName.value}"),s"scm:git:git://github.com/scala/${repoName.value}.git")),

0 commit comments

Comments
 (0)