diff --git a/cmd/state-installer/cmd.go b/cmd/state-installer/cmd.go index dc9f1deb72..89a5450319 100644 --- a/cmd/state-installer/cmd.go +++ b/cmd/state-installer/cmd.go @@ -105,7 +105,7 @@ func main() { OutWriter: os.Stdout, ErrWriter: os.Stderr, Colored: true, - Interactive: false, + Interactive: term.IsTerminal(int(os.Stdin.Fd())), }) if err != nil { multilog.Critical("Could not set up output handler: " + errs.JoinMessage(err)) diff --git a/cmd/state-remote-installer/main.go b/cmd/state-remote-installer/main.go index 7aa6a5653f..af903268b6 100644 --- a/cmd/state-remote-installer/main.go +++ b/cmd/state-remote-installer/main.go @@ -29,6 +29,7 @@ import ( "github.com/ActiveState/cli/internal/runbits/errors" "github.com/ActiveState/cli/internal/runbits/panics" "github.com/ActiveState/cli/internal/updater" + "golang.org/x/term" ) type Params struct { @@ -90,7 +91,7 @@ func main() { OutWriter: os.Stdout, ErrWriter: os.Stderr, Colored: true, - Interactive: false, + Interactive: term.IsTerminal(int(os.Stdin.Fd())), }) if err != nil { logging.Error("Could not set up output handler: " + errs.JoinMessage(err))