Add colon at the end of secret prompts (#9004)

This commit is contained in:
Nero Blackstone​ 2024-04-26 18:58:45 +08:00 committed by GitHub
parent 28c4d3075b
commit 93113e12ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -111,7 +111,7 @@ func Login(opts *LoginOptions) error {
if sshChoice {
passphrase, err := opts.Prompter.Password(
"Enter a passphrase for your new SSH key (Optional)")
"Enter a passphrase for your new SSH key (Optional):")
if err != nil {
return err
}

View file

@ -379,7 +379,7 @@ func getBody(opts *SetOptions) ([]byte, error) {
}
if opts.IO.CanPrompt() {
bodyInput, err := opts.Prompter.Password("Paste your secret")
bodyInput, err := opts.Prompter.Password("Paste your secret:")
if err != nil {
return nil, err
}

View file

@ -596,7 +596,7 @@ func Test_getBodyPrompt(t *testing.T) {
ios.SetStdoutTTY(true)
pm := prompter.NewMockPrompter(t)
pm.RegisterPassword("Paste your secret", func(_ string) (string, error) {
pm.RegisterPassword("Paste your secret:", func(_ string) (string, error) {
return "cool secret", nil
})