@@ -494,6 +494,8 @@ func (c *LoginCommand) interactiveGetTokenByUI(hostname svchost.Hostname, credsC
494494 return "" , diags
495495 }
496496
497+ c .Ui .Output ("\n ---------------------------------------------------------------------------------\n " )
498+
497499 tokensURL := url.URL {
498500 Scheme : "https" ,
499501 Host : service .Hostname (),
@@ -508,6 +510,7 @@ func (c *LoginCommand) interactiveGetTokenByUI(hostname svchost.Hostname, credsC
508510 c .Ui .Output (fmt .Sprintf ("Terraform must now open a web browser to the tokens page for %s.\n " , hostname .ForDisplay ()))
509511 c .Ui .Output (fmt .Sprintf ("If a browser does not open this automatically, open the following URL to proceed:\n %s\n " , tokensURL .String ()))
510512 } else {
513+ log .Printf ("[DEBUG] error opening web browser: %s" , err )
511514 // Assume we're on a platform where opening a browser isn't possible.
512515 launchBrowserManually = true
513516 }
@@ -590,20 +593,15 @@ func (c *LoginCommand) interactiveContextConsent(hostname svchost.Hostname, gran
590593 }
591594 }
592595
593- v , err := c .Ui .Ask ("Do you want to proceed? (y/n) " )
596+ v , err := c .Ui .Ask ("Do you want to proceed? Only 'yes' will be accepted to confirm. " )
594597 if err != nil {
595598 // Should not happen because this command checks that input is enabled
596599 // before we get to this point.
597600 diags = diags .Append (err )
598601 return false , diags
599602 }
600603
601- switch strings .ToLower (v ) {
602- case "y" , "yes" :
603- return true , diags
604- default :
605- return false , diags
606- }
604+ return strings .ToLower (v ) == "yes" , diags
607605}
608606
609607func (c * LoginCommand ) listenerForCallback (minPort , maxPort uint16 ) (net.Listener , string , error ) {
0 commit comments