Use pretty print for json module graph
Test: SOONG_DUMP_JSON_MODULE_GRAPH=/tmp/json/srcs m nothing and verify
output
Change-Id: I779dcebce7435f2f48263909c4c62c27c0fbfec4
diff --git a/context.go b/context.go
index cc6e8e1..3234fd7 100644
--- a/context.go
+++ b/context.go
@@ -2340,7 +2340,9 @@
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