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

Commit 22c2756

Browse files
authored
Merge branch 'feature/init-with-setup-code' into feature/refer-to-web-signup
2 parents d477369 + 6c3a6bb commit 22c2756

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

internals/secrethub/init.go

Lines changed: 1 addition & 13 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"
@@ -97,8 +95,7 @@ func (cmd *InitCommand) Run() error {
9795
}
9896
option, err := ui.Choose(cmd.io, "How do you want to initialize your SecretHub account on this device?",
9997
[]string{
100-
"Create a new SecretHub account",
101-
"Use a setup code to set up an account created on the SecretHub website",
98+
"Sign up for a new account",
10299
"Use a backup code to recover an existing account",
103100
}, 3)
104101
if err != nil {
@@ -111,8 +108,6 @@ func (cmd *InitCommand) Run() error {
111108
fmt.Fprintln(cmd.io.Output(), "Go to https://signup.secrethub.io/ and follow the steps to create an account and get it set up on this machine.")
112109
return nil
113110
case 1:
114-
mode = InitModeSetupCode
115-
case 2:
116111
mode = InitModeBackupCode
117112
}
118113
}
@@ -129,13 +124,6 @@ func (cmd *InitCommand) Run() error {
129124
return signupCommand.Run()
130125
case InitModeSetupCode:
131126
setupCode := cmd.setupCode
132-
if setupCode == "" {
133-
var err error
134-
setupCode, err = ui.AskAndValidate(cmd.io, "What is your setup code?\n", 3, api.ValidateSetupCode)
135-
if err != nil {
136-
return err
137-
}
138-
}
139127

140128
fmt.Fprintf(cmd.io.Output(), credentialCreationMessage, credentialPath)
141129

0 commit comments

Comments
 (0)