Skip to content

Commit

Permalink
fix(accessibility): parseBool defaults to no (#442)
Browse files Browse the repository at this point in the history
Matching the prompt of "Choose [y/N]:" default is now
equal to N.

Resolves #264
  • Loading branch information
jaredallard authored Nov 27, 2024
1 parent dba9876 commit 2522a15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion accessibility/accessibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ func parseBool(s string) (bool, error) {
}
}

for _, n := range []string{"n", "no"} {
// As a special case, we default to "" to no since the usage of this
// function suggests N is the default.
for _, n := range []string{"", "n", "no"} {
if n == s {
return false, nil
}
Expand Down

0 comments on commit 2522a15

Please sign in to comment.