From 02dd7c79325c070755b23e91bf44c47a5181e4cd Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Thu, 4 Aug 2022 13:34:04 +0000 Subject: [PATCH 1/2] fix: Move state pull output to stdout Fixes #1645. --- cli/state.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/state.go b/cli/state.go index 385df01d7754c..3b7e3a1202a1f 100644 --- a/cli/state.go +++ b/cli/state.go @@ -1,6 +1,7 @@ package cli import ( + "fmt" "io" "os" "time" @@ -50,7 +51,7 @@ func statePull() *cobra.Command { } if len(args) < 2 { - cmd.Println(string(state)) + fmt.Fprintln(cmd.OutOrStdout(), string(state)) return nil } From b04770c21587846ca12901f1741f4b1f25a30288 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Thu, 4 Aug 2022 10:09:31 -0500 Subject: [PATCH 2/2] Update cli/state.go Co-authored-by: Abhineet Jain --- cli/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/state.go b/cli/state.go index 3b7e3a1202a1f..498397a88ce9d 100644 --- a/cli/state.go +++ b/cli/state.go @@ -51,7 +51,7 @@ func statePull() *cobra.Command { } if len(args) < 2 { - fmt.Fprintln(cmd.OutOrStdout(), string(state)) + _, _ = fmt.Fprintln(cmd.OutOrStdout(), string(state)) return nil }