From 025e442f2e90f1faec02f285b4f750e1713cc41f Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Sun, 12 Jan 2025 09:35:39 +0100 Subject: [PATCH] fix: Trim the cat output `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