File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments