From 0b414947709dd0b370453051e7f0597a5675122a Mon Sep 17 00:00:00 2001 From: siyual-park Date: Sat, 16 Nov 2024 11:40:59 +0900 Subject: [PATCH] fix: remove stdout when start --- cmd/pkg/cli/start.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/pkg/cli/start.go b/cmd/pkg/cli/start.go index e6343e21..fc56504e 100644 --- a/cmd/pkg/cli/start.go +++ b/cmd/pkg/cli/start.go @@ -1,6 +1,7 @@ package cli import ( + "io" "os" "os/signal" "syscall" @@ -68,6 +69,9 @@ func runStartCommand(config StartConfig) func(cmd *cobra.Command, args []string) return err } + out := cmd.OutOrStdout() + cmd.SetOut(io.Discard) + if err := applySpecs(cmd); err != nil { return err } @@ -78,6 +82,8 @@ func runStartCommand(config StartConfig) func(cmd *cobra.Command, args []string) return err } + cmd.SetOut(out) + h := config.Hook if h == nil { h = hook.New()