Skip to content

Commit

Permalink
fix: Trim the cat output (#720)
Browse files Browse the repository at this point in the history
`os.ReadFile` includes a trailing EOL, so we have to remove it to get
the correct value
  • Loading branch information
Tom-Hubrecht authored Jan 12, 2025
1 parent eb7e8f5 commit 1b13355
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/hook/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1b13355

Please sign in to comment.