Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 6c3a6bb

Browse files
authored
Merge pull request #341 from secrethub/feature/remove-setup-code-prompt
Remove prompt for setup code
2 parents ac08b03 + f726593 commit 6c3a6bb

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

internals/secrethub/init.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import (
66
"os"
77
"time"
88

9-
"github.com/secrethub/secrethub-go/internals/api"
10-
119
"github.com/secrethub/secrethub-cli/internals/cli/progress"
1210
"github.com/secrethub/secrethub-cli/internals/cli/ui"
1311
"github.com/secrethub/secrethub-cli/internals/secrethub/command"
@@ -98,7 +96,6 @@ func (cmd *InitCommand) Run() error {
9896
option, err := ui.Choose(cmd.io, "How do you want to initialize your SecretHub account on this device?",
9997
[]string{
10098
"Signup for a new account",
101-
"Use a setup code to set up an account created on the SecretHub website",
10299
"Use a backup code to recover an existing account",
103100
}, 3)
104101
if err != nil {
@@ -109,8 +106,6 @@ func (cmd *InitCommand) Run() error {
109106
case 0:
110107
mode = InitModeSignup
111108
case 1:
112-
mode = InitModeSetupCode
113-
case 2:
114109
mode = InitModeBackupCode
115110
}
116111
}
@@ -127,13 +122,6 @@ func (cmd *InitCommand) Run() error {
127122
return signupCommand.Run()
128123
case InitModeSetupCode:
129124
setupCode := cmd.setupCode
130-
if setupCode == "" {
131-
var err error
132-
setupCode, err = ui.AskAndValidate(cmd.io, "What is your setup code?\n", 3, api.ValidateSetupCode)
133-
if err != nil {
134-
return err
135-
}
136-
}
137125

138126
fmt.Fprintf(cmd.io.Output(), credentialCreationMessage, credentialPath)
139127

0 commit comments

Comments
 (0)