Merge "Pretty print SBox manifest files to make them easier to read" into main
This commit is contained in:
@@ -629,8 +629,9 @@ func (r *RuleBuilder) build(name string, desc string, ninjaEscapeCommandString b
|
|||||||
name, r.sboxManifestPath.String(), r.outDir.String())
|
name, r.sboxManifestPath.String(), r.outDir.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a rule to write the manifest as textproto.
|
// Create a rule to write the manifest as textproto. Pretty print it by indenting and
|
||||||
pbText, err := prototext.Marshal(&manifest)
|
// splitting across multiple lines.
|
||||||
|
pbText, err := prototext.MarshalOptions{Indent: " "}.Marshal(&manifest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ReportPathErrorf(r.ctx, "sbox manifest failed to marshal: %q", err)
|
ReportPathErrorf(r.ctx, "sbox manifest failed to marshal: %q", err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user