From f3e284e9ca8d47bb8b1e6816240836b90ca3e976 Mon Sep 17 00:00:00 2001 From: Peter Ebden Date: Mon, 30 Oct 2017 13:25:19 +0000 Subject: [PATCH] Alter print syntax so it's acceptable for a BUILD file and put it on stdout. (#240) --- src/query/print.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/query/print.go b/src/query/print.go index f4c37f89cb..433deb62f1 100644 --- a/src/query/print.go +++ b/src/query/print.go @@ -18,12 +18,12 @@ import ( func Print(graph *core.BuildGraph, labels []core.BuildLabel, fields []string) { for _, label := range labels { if len(fields) == 0 { - fmt.Fprintf(os.Stderr, "%s:\n", label) + fmt.Fprintf(os.Stdout, "# %s:\n", label) } if len(fields) > 0 { newPrinter(os.Stdout, graph.TargetOrDie(label), 0).PrintFields(fields) } else { - newPrinter(os.Stdout, graph.TargetOrDie(label), 2).PrintTarget() + newPrinter(os.Stdout, graph.TargetOrDie(label), 0).PrintTarget() } } }