diff --git a/modules/programs/sbt.nix b/modules/programs/sbt.nix index 4e10d61e..bf355a80 100644 --- a/modules/programs/sbt.nix +++ b/modules/programs/sbt.nix @@ -9,7 +9,7 @@ let ''; renderCredential = cred: '' - credentials += Credentials("${cred.realm}", "${cred.host}", "${cred.user}", "${cred.passwordCommand}".lazyLines.mkString("\n")) + credentials += Credentials("${cred.realm}", "${cred.host}", "${cred.user}", "${cred.passwordCommand}".!!.trim) ''; renderCredentials = creds: '' diff --git a/tests/modules/programs/sbt/credentials.nix b/tests/modules/programs/sbt/credentials.nix index 83ec904c..55c3936a 100644 --- a/tests/modules/programs/sbt/credentials.nix +++ b/tests/modules/programs/sbt/credentials.nix @@ -19,8 +19,8 @@ let ]; expectedCredentialsSbt = pkgs.writeText "credentials.sbt" '' import scala.sys.process._ - credentials += Credentials("Sonatype Nexus Repository Manager", "example.com", "user", "echo password".lazyLines.mkString("\n")) - credentials += Credentials("Sonatype Nexus Repository Manager X", "v2.example.com", "user1", "echo password1".lazyLines.mkString("\n")) + credentials += Credentials("Sonatype Nexus Repository Manager", "example.com", "user", "echo password".!!.trim) + credentials += Credentials("Sonatype Nexus Repository Manager X", "v2.example.com", "user1", "echo password1".!!.trim) ''; credentialsSbtPath = ".sbt/1.0/credentials.sbt"; in {