Use pretty print for json module graph

Test: SOONG_DUMP_JSON_MODULE_GRAPH=/tmp/json/srcs m nothing and verify
      output
Change-Id: I779dcebce7435f2f48263909c4c62c27c0fbfec4
This commit is contained in:
Liz Kammer 2021-08-17 17:32:42 -04:00
parent 6ec924c12b
commit 6e4ee8db2d

View file

@ -2340,7 +2340,9 @@ func (c *Context) PrintJSONGraph(w io.Writer) {
modules = append(modules, jm) modules = append(modules, jm)
} }
json.NewEncoder(w).Encode(modules) e := json.NewEncoder(w)
e.SetIndent("", "\t")
e.Encode(modules)
} }
// PrepareBuildActions generates an internal representation of all the build // PrepareBuildActions generates an internal representation of all the build