Skip to content

Commit 104fc18

Browse files
authored
Merge pull request #189 from replicatedhq/fixY
Allow Y and N
2 parents 493c725 + 18fcd35 commit 104fc18

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cli/cmd/release_create.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Prepared to create release with defaults:
184184
if err != nil {
185185
return err
186186
}
187-
if confirmed != "y" {
187+
if strings.ToLower(confirmed) != "y" {
188188
return errors.New("configuration declined")
189189
}
190190
fmt.Printf("You can use the --confirm-auto or -y flag in the future to skip this prompt.\n")
@@ -414,11 +414,12 @@ func promptForConfirm() (string, error) {
414414
Templates: templates,
415415
Default: "y",
416416
Validate: func(input string) error {
417-
if input != "y" && input != "n" {
417+
switch strings.ToLower(input) {
418+
case "y", "n":
419+
return nil
420+
default:
418421
return errors.New(`please choose "y" or "n"`)
419422
}
420-
421-
return nil
422423
},
423424
}
424425

0 commit comments

Comments
 (0)