We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d398568 + 36a7cfb commit 7dbeb57Copy full SHA for 7dbeb57
internal/print/print.go
@@ -61,9 +61,11 @@ func Question(ask string) bool {
61
cmdinfo.Name, color.GreenString("CHECK"), ask+" [Y/n] ")
62
_, err := FmtScanln(&response)
63
if err != nil {
64
- // If user input only enter.
+ // If user input only enter, [Y/n] syntax is commonly used to denote that
65
+ // "yes" is the default.
66
+ // https://github.com/nao1215/gup/issues/146
67
if strings.Contains(err.Error(), "expected newline") {
- return Question(ask)
68
+ return true
69
}
70
fmt.Fprint(os.Stderr, err.Error())
71
return false
0 commit comments