From 93113e12ea6fe5f19005aa5a724dcd12fb2fcab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nero=20Blackstone=E2=80=8B?= Date: Fri, 26 Apr 2024 18:58:45 +0800 Subject: [PATCH] Add colon at the end of secret prompts (#9004) --- pkg/cmd/auth/shared/login_flow.go | 2 +- pkg/cmd/secret/set/set.go | 2 +- pkg/cmd/secret/set/set_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/auth/shared/login_flow.go b/pkg/cmd/auth/shared/login_flow.go index 4a5e45326..5a1df34c6 100644 --- a/pkg/cmd/auth/shared/login_flow.go +++ b/pkg/cmd/auth/shared/login_flow.go @@ -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 } diff --git a/pkg/cmd/secret/set/set.go b/pkg/cmd/secret/set/set.go index d5fbede0b..dcfd4df14 100644 --- a/pkg/cmd/secret/set/set.go +++ b/pkg/cmd/secret/set/set.go @@ -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 } diff --git a/pkg/cmd/secret/set/set_test.go b/pkg/cmd/secret/set/set_test.go index 376ef2d53..3b46e63f1 100644 --- a/pkg/cmd/secret/set/set_test.go +++ b/pkg/cmd/secret/set/set_test.go @@ -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 })