mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-15 11:57:59 +00:00
Source files: fix empty line in Package-List
This commit is contained in:
+5
-2
@@ -291,8 +291,11 @@ func (c *ControlFileReader) ReadStanza() (Stanza, error) {
|
||||
lastField = canonicalCase(parts[0])
|
||||
lastFieldMultiline = isMultilineField(lastField, c.isRelease)
|
||||
if lastFieldMultiline {
|
||||
stanza[lastField] = parts[1]
|
||||
if parts[1] != "" {
|
||||
// Trim trailing whitespace from the inline value so that
|
||||
// "Package-List: " does not add empty line
|
||||
inlineVal := strings.TrimRight(parts[1], " \t")
|
||||
stanza[lastField] = inlineVal
|
||||
if inlineVal != "" {
|
||||
stanza[lastField] += "\n"
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user