From 345f105d4709990c06487bcfdf2192bd9a7c444f Mon Sep 17 00:00:00 2001 From: blurfx Date: Sun, 6 Aug 2023 00:19:34 +0900 Subject: [PATCH] feat: set cobra default output to stdout --- cmd/yorkie/commands.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/yorkie/commands.go b/cmd/yorkie/commands.go index 2e340c785..ab682684f 100644 --- a/cmd/yorkie/commands.go +++ b/cmd/yorkie/commands.go @@ -18,6 +18,8 @@ package main import ( + "os" + "github.com/spf13/cobra" "github.com/yorkie-team/yorkie/cmd/yorkie/config" @@ -40,6 +42,8 @@ func Run() int { } func init() { + rootCmd.SetOut(os.Stdout) + rootCmd.SetErr(os.Stderr) rootCmd.AddCommand(project.SubCmd) rootCmd.AddCommand(document.SubCmd) // TODO(chacha912): set rpcAddr from env using viper.