From 363cfcb0ce1477249a40861ef936f377b95aaf09 Mon Sep 17 00:00:00 2001 From: umohnani8 Date: Mon, 5 Feb 2018 10:15:36 -0500 Subject: Fix when the --format flag prints a new line at the end If the output is to a terminal, return a new line at the end of the output so that the output is visually appealing. If the output is being piped, or saved to a file, basically not being outputted to a terminal, do not print a new line at the end of the output. This ensures any further data manipulation with the results happens smoothly without requiring to remember the '/n' at the end of the output. Signed-off-by: umohnani8 --- test/e2e/import_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/e2e/import_test.go') diff --git a/test/e2e/import_test.go b/test/e2e/import_test.go index 23208ca62..448a89539 100644 --- a/test/e2e/import_test.go +++ b/test/e2e/import_test.go @@ -62,7 +62,7 @@ var _ = Describe("Podman import", func() { results := podmanTest.Podman([]string{"images", "-q"}) results.WaitWithDefaultTimeout() Expect(results.ExitCode()).To(Equal(0)) - Expect(len(results.OutputToStringArray())).To(Equal(4)) + Expect(len(results.OutputToStringArray())).To(Equal(3)) }) It("podman import with message flag", func() { -- cgit v1.2.3-54-g00ecf