mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-06 05:30:57 +00:00
Safety belt: multi-line fields should always end with \n.
This commit is contained in:
Vendored
+3
@@ -29,6 +29,9 @@ func writeField(w *bufio.Writer, field, value string) (err error) {
|
||||
if !multiline {
|
||||
_, err = w.WriteString(field + ": " + value + "\n")
|
||||
} else {
|
||||
if !strings.HasSuffix(value, "\n") {
|
||||
value = value + "\n"
|
||||
}
|
||||
_, err = w.WriteString(field + ":" + value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user