diff --git a/command/login.go b/command/login.go index f373690de..eb6df895d 100644 --- a/command/login.go +++ b/command/login.go @@ -17,7 +17,6 @@ import ( "github.com/hashicorp/terraform/httpclient" "github.com/hashicorp/terraform/svchost" "github.com/hashicorp/terraform/svchost/disco" - "github.com/hashicorp/terraform/terraform" "github.com/hashicorp/terraform/tfdiags" uuid "github.com/hashicorp/go-uuid" @@ -434,11 +433,7 @@ func (c *LoginCommand) interactiveContextConsent(hostname svchost.Hostname, gran } } - v, err := c.UIInput().Input(context.Background(), &terraform.InputOpts{ - Id: "confirm", - Query: "Do you want to proceed with login and store the new credentials?", - Description: "Enter 'y' or 'yes' to confirm.", - }) + v, err := c.prompt("Do you want to proceed? (y/n)", false) if err != nil { // Should not happen because this command checks that input is enabled // before we get to this point. diff --git a/main.go b/main.go index 5412a5b72..3cc867801 100644 --- a/main.go +++ b/main.go @@ -106,7 +106,10 @@ func init() { OutputPrefix: OutputPrefix, InfoPrefix: OutputPrefix, ErrorPrefix: ErrorPrefix, - Ui: &cli.BasicUi{Writer: os.Stdout}, + Ui: &cli.BasicUi{ + Writer: os.Stdout, + Reader: os.Stdin, + }, } }