Skip to content
Prev Previous commit
Next Next commit
indent
  • Loading branch information
johnstcn committed Mar 1, 2024
commit 397357e25af9502fad3d0916714bb8b5c97faef8
5 changes: 3 additions & 2 deletions cli/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,9 @@ func writeBundle(src *support.Bundle, dest *zip.Writer) error {
if err != nil {
return xerrors.Errorf("create file %q in archive: %w", k, err)
}
err = json.NewEncoder(f).Encode(v)
if err != nil {
enc := json.NewEncoder(f)
enc.SetIndent("", " ")
if err := enc.Encode(v); err != nil {
return xerrors.Errorf("write json to %q: %w", k, err)
}
}
Expand Down