From 1b1335519635bdd210a071404c8f05cb26026c3d Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Sun, 12 Jan 2025 12:27:16 +0100 Subject: [PATCH] fix: Trim the cat output (#720) `os.ReadFile` includes a trailing EOL, so we have to remove it to get the correct value --- internal/hook/hook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/hook/hook.go b/internal/hook/hook.go index 1796e1c..394dd79 100644 --- a/internal/hook/hook.go +++ b/internal/hook/hook.go @@ -970,7 +970,7 @@ func cat(s string) string { return "" } - return string(data) + return strings.TrimSuffix(string(data), "\n") } // credential provides a template function to retreive secrets using systemd's LoadCredential mechanism