Skip to content

Commit

Permalink
Merge branch 'update-toolchain' of https://github.com/tosc-rs/mnemos
Browse files Browse the repository at this point in the history
…into update-toolchain
  • Loading branch information
Anatol Ulrich committed Aug 10, 2024
2 parents ce04211 + 195d52c commit fe3018d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,24 @@ status() {
# Prompt the user to confirm an action
#
# Args:
# $1: message to display to the user along with the `[y/N]` prompt
# $1: message to display to the user along with the `[Y/n]` prompt
#
# Returns:
# 0 if the user confirmed, 1 otherwise
confirm() {
while read -r -p "$1 [Y/n] " input
do
case "$input" in
[yY][eE][sS]|[yY])
# empty string counts as 'yes'
[yY][eE][sS]|[yY]|""|" "|"\n")
return 0
;;
[nN][oO]|[nN])
return 1
;;
*)
err "invalid input $input"
err "invalid input '$input'"
;;
esac
done
}
}

0 comments on commit fe3018d

Please sign in to comment.