Skip to content

Commit

Permalink
Installers should not default to non-interactive.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchell-as committed Dec 18, 2024
1 parent 370782b commit 86fb843
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/state-installer/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 2 additions & 1 deletion cmd/state-remote-installer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 86fb843

Please sign in to comment.