Skip to content

Commit ad20b23

Browse files
fix: Move state pull output to stdout (coder#3382)
* fix: Move state pull output to stdout Fixes coder#1645. * Update cli/state.go Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com> Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>
1 parent 303b280 commit ad20b23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cli/state.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package cli
22

33
import (
4+
"fmt"
45
"io"
56
"os"
67
"time"
@@ -50,7 +51,7 @@ func statePull() *cobra.Command {
5051
}
5152

5253
if len(args) < 2 {
53-
cmd.Println(string(state))
54+
_, _ = fmt.Fprintln(cmd.OutOrStdout(), string(state))
5455
return nil
5556
}
5657

0 commit comments

Comments
 (0)