Skip to content

Commit 2eb02be

Browse files
authored
fix(init): remove access key prompt (#2519)
1 parent 6aff878 commit 2eb02be

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

internal/namespaces/init/init.go

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,6 @@ Default path for configuration file is based on the following priority order:
149149
// Manually prompt for missing args:
150150

151151
// Credentials
152-
if args.AccessKey == "" {
153-
_, _ = interactive.Println()
154-
args.AccessKey, err = promptAccessKey(ctx)
155-
if err != nil {
156-
return err
157-
}
158-
}
159-
160152
if args.SecretKey == "" {
161153
_, _ = interactive.Println()
162154
args.SecretKey, err = promptSecret(ctx)
@@ -386,36 +378,6 @@ func promptSecret(ctx context.Context) (string, error) {
386378
}
387379
}
388380

389-
func promptAccessKey(ctx context.Context) (string, error) {
390-
accessKey, err := interactive.Readline(&interactive.ReadlineConfig{
391-
Ctx: ctx,
392-
PromptFunc: func(value string) string {
393-
accessKey := "access-key"
394-
switch {
395-
case validation.IsUUID(value):
396-
accessKey = terminal.Style(accessKey, color.FgBlue)
397-
}
398-
return terminal.Style(fmt.Sprintf("Enter a valid %s: ", accessKey), color.Bold)
399-
},
400-
ValidateFunc: func(s string) error {
401-
if validation.IsAccessKey(s) {
402-
return nil
403-
}
404-
return fmt.Errorf("invalid access-key")
405-
},
406-
})
407-
if err != nil {
408-
return "", err
409-
}
410-
411-
switch {
412-
case validation.IsAccessKey(accessKey):
413-
return accessKey, nil
414-
default:
415-
return "", fmt.Errorf("invalid access-key: '%v'", accessKey)
416-
}
417-
}
418-
419381
const logo = `
420382
@@@@@@@@@@@@@@@.
421383
@@@@@@@@@@@@@@@@@@@@ __ __ _

0 commit comments

Comments
 (0)