Skip to content

Commit 12f9567

Browse files
authored
Correctly format multiline descriptions in deb packages (#15210)
1 parent d1bc077 commit 12f9567

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Microsoft.DotNet.Build.Tasks.Installers/src/CreateControlFile.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ public override bool Execute()
7373
{
7474
writer.WriteLine($"{property.ItemSpec}: {property.GetMetadata("Value")}");
7575
}
76-
writer.WriteLine($"Description: {Description}");
76+
77+
// As per the control spec, multiline descriptions must have leading spaces
78+
// for each line after the first.
79+
// Two spaces represents a verbatim line break (as compared to one for package authoring that will not be preserved).
80+
writer.WriteLine($"Description: {Description.Replace("\n", "\n ")}");
7781
return true;
7882
}
7983
}

0 commit comments

Comments
 (0)