Skip to content

Commit

Permalink
Fix JSON output not printing newline (#1091)
Browse files Browse the repository at this point in the history
  • Loading branch information
silvanocerza committed Dec 1, 2020
1 parent df8c924 commit 05ce150
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/feedback/feedback.go
Expand Up @@ -118,7 +118,7 @@ func (fb *Feedback) printJSON(v interface{}) {
if d, err := json.MarshalIndent(v, "", " "); err != nil {
fb.Errorf("Error during JSON encoding of the output: %v", err)
} else {
fmt.Fprint(fb.out, string(d))
fmt.Fprintf(fb.out, "%v\n", string(d))
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/test_board.py
Expand Up @@ -442,7 +442,7 @@ def test_board_details(run_command):
# Test board listall with and without showing hidden elements
result = run_command("board listall MIPS --format json")
assert result.ok
assert result.stdout == "{}"
assert result.stdout == "{}\n"

result = run_command("board listall MIPS -a --format json")
assert result.ok
Expand Down

0 comments on commit 05ce150

Please sign in to comment.