From ef214cc7e4b2dc55db16ddb8efa73b36f1ccfa67 Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Tue, 30 Jul 2024 00:15:59 +0800 Subject: [PATCH] Chore: writeto dev --- cmd/start/start.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/start/start.go b/cmd/start/start.go index 5717af8..76de1b3 100644 --- a/cmd/start/start.go +++ b/cmd/start/start.go @@ -93,12 +93,12 @@ func handleStdIO(c pty.Console) error { if runtime.GOOS == "windows" && c.StdErr() != nil { go func() { _, _ = io.Copy(colorable.NewColorableStderr(), c.StdErr()) }() } - handleStdOut(c) - return nil -} - -func handleStdOut(c pty.Console) { + _, ok := c.StdErr().(io.WriterTo) + if !ok { + fmt.Println("StdErr is not a WriterTo") + } _, _ = io.Copy(colorable.NewColorableStdout(), c.StdOut()) + return nil } const (