Skip to content

Commit

Permalink
Alter print syntax so it's acceptable for a BUILD file and put it on …
Browse files Browse the repository at this point in the history
…stdout. (#240)
  • Loading branch information
peterebden authored Oct 30, 2017
1 parent 15d47b0 commit f3e284e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/query/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}
Expand Down

0 comments on commit f3e284e

Please sign in to comment.