From 284d2e4a36ec7846ca2c2f3e01f8e5bc5637f364 Mon Sep 17 00:00:00 2001
From: ansgarz <ansgar.zwick@meissa.de>
Date: Thu, 27 Feb 2025 21:32:22 +0100
Subject: [PATCH] fix addTextToFile & tests

---
 .../provs/framework/ubuntu/filesystem/base/Filesystem.kt        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/filesystem/base/Filesystem.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/filesystem/base/Filesystem.kt
index 00899c2..097f7cf 100644
--- a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/filesystem/base/Filesystem.kt
+++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/filesystem/base/Filesystem.kt
@@ -240,7 +240,7 @@ fun Prov.addTextToFile(
             return@taskWithResult ProvResult(true, out = "Text already in file")
         }
         cmd(
-            "printf '%s' " + "${text + "\n"}"
+            "printf '%s' " + text
                 .escapeAndEncloseByDoubleQuoteForShell() + " | ${sudoAsText(sudo)} tee -a ${file.path} > /dev/null"
         )
     }