From 821299e90e6e11b5db5dc258b2d85d3b01e95857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Tue, 21 Sep 2021 01:34:31 +0200 Subject: [PATCH] sbt: run passwordCommand without trailing newline --- modules/programs/sbt.nix | 2 +- tests/modules/programs/sbt/credentials.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/programs/sbt.nix b/modules/programs/sbt.nix index d3ba31e19..663956bad 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}".!!) + credentials += Credentials("${cred.realm}", "${cred.host}", "${cred.user}", "${cred.passwordCommand}".lazyLines.mkString("\n")) ''; renderCredentials = creds: '' diff --git a/tests/modules/programs/sbt/credentials.nix b/tests/modules/programs/sbt/credentials.nix index 5aa4c2f77..83ec904c9 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".!!) - credentials += Credentials("Sonatype Nexus Repository Manager X", "v2.example.com", "user1", "echo password1".!!) + 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")) ''; credentialsSbtPath = ".sbt/1.0/credentials.sbt"; in {