diff --git a/modules/programs/sbt.nix b/modules/programs/sbt.nix index de14bc6f3..7d8a069f8 100644 --- a/modules/programs/sbt.nix +++ b/modules/programs/sbt.nix @@ -12,7 +12,7 @@ let let symbol = "credential_${toString idx}"; in '' lazy val ${symbol} = "${cred.passwordCommand}".!!.trim - credentials += Credentials("${cred.realm}", "${cred.host}", "${cred.user}", ${symbol}) + ThisBuild / credentials += Credentials("${cred.realm}", "${cred.host}", "${cred.user}", ${symbol}) ''; renderCredentials = creds: '' diff --git a/tests/modules/programs/sbt/credentials.nix b/tests/modules/programs/sbt/credentials.nix index 1a79582ab..0e15d10e4 100644 --- a/tests/modules/programs/sbt/credentials.nix +++ b/tests/modules/programs/sbt/credentials.nix @@ -20,9 +20,9 @@ let expectedCredentialsSbt = pkgs.writeText "credentials.sbt" '' import scala.sys.process._ lazy val credential_0 = "echo password".!!.trim - credentials += Credentials("Sonatype Nexus Repository Manager", "example.com", "user", credential_0) + ThisBuild / credentials += Credentials("Sonatype Nexus Repository Manager", "example.com", "user", credential_0) lazy val credential_1 = "echo password1".!!.trim - credentials += Credentials("Sonatype Nexus Repository Manager X", "v2.example.com", "user1", credential_1) + ThisBuild / credentials += Credentials("Sonatype Nexus Repository Manager X", "v2.example.com", "user1", credential_1) ''; credentialsSbtPath = ".sbt/1.0/credentials.sbt"; in {