Change login prompt text and enable no-echo
This makes two minor tweaks to the login prompt:
1. Change the text so that it hyperlinks in most terminals, including
iTerm, in a way that doesn't include excess characters.
2. Disable echoing of the token.
@@ -160,8 +160,8 @@ func Login(d diag.Sink, cloudURL string) (Backend, error) {
if accessToken != "" {
fmt.Printf("Using access token from %s\n", AccessTokenEnvVar)
} else {
- token, readerr := cmdutil.ReadConsole(
- fmt.Sprintf("Enter your Pulumi access token (located at %s)", cloudConsoleURL(cloudURL, "account")))
+ token, readerr := cmdutil.ReadConsoleNoEcho(
+ fmt.Sprintf("Enter your Pulumi access token from %s", cloudConsoleURL(cloudURL, "account")))
if readerr != nil {
return nil, readerr
}
