We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85d6770 commit 00c2c49Copy full SHA for 00c2c49
1 file changed
cmd/prompt/prompt.go
@@ -98,5 +98,8 @@ func (u Pipe) Confirm(message string, defaultValue bool) (bool, error) {
98
_, _ = fmt.Fprint(u.stdout, message)
99
var answer string
100
_, _ = fmt.Fscanln(u.stdin, &answer)
101
+ if answer == "" {
102
+ return defaultValue, nil
103
+ }
104
return utils.StringToBool(answer), nil
105
}
0 commit comments