Skip to content

Commit

Permalink
SHOPPE: FIX: Fix empty strings returning no even when the default opt…
Browse files Browse the repository at this point in the history
…ion is yes in yesno prompts
  • Loading branch information
knuxify committed Oct 27, 2019
1 parent 9cc44ba commit c045c7e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions shoppe
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ yesno() {
choice="$1"
else
read -p "$yesnotxt $yesnochoice " -re choice
[[ -z "$choice" ]] && choice="$1"
fi
if [[ "$choice" == "Y" || "$choice" == "y" ]]; then choice="yes"; else choice="no"; fi
}
Expand Down

0 comments on commit c045c7e

Please sign in to comment.