diff --git a/cli/feedback/feedback.go b/cli/feedback/feedback.go index 7284be4a522..810f079b6b2 100644 --- a/cli/feedback/feedback.go +++ b/cli/feedback/feedback.go @@ -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)) } } diff --git a/test/test_board.py b/test/test_board.py index 919a5eed75c..0dbc34c427f 100644 --- a/test/test_board.py +++ b/test/test_board.py @@ -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