Skip to content

Commit

Permalink
Pretty-print the output, regardless of whether or not the filename is…
Browse files Browse the repository at this point in the history
… "-"
  • Loading branch information
sean- committed Nov 27, 2017
1 parent 58e797d commit 1f5e1b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func (m *ParseMode) run(c *kingpin.ParseContext) error {
enc := json.NewEncoder(w)
enc.SetEscapeHTML(false)

if m.PrettyPrint && m.OutFilename == "-" {
if m.PrettyPrint || (m.OutFilename == "-" && m.PrettyPrint) {
enc.SetIndent("", " ")
}

Expand Down

0 comments on commit 1f5e1b3

Please sign in to comment.