Skip to content

Commit 1b13355

Browse files
authored
fix: Trim the cat output (#720)
`os.ReadFile` includes a trailing EOL, so we have to remove it to get the correct value
1 parent eb7e8f5 commit 1b13355

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/hook/hook.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ func cat(s string) string {
970970
return ""
971971
}
972972

973-
return string(data)
973+
return strings.TrimSuffix(string(data), "\n")
974974
}
975975

976976
// credential provides a template function to retreive secrets using systemd's LoadCredential mechanism

0 commit comments

Comments
 (0)