Fix capture of whiptail's exit status

The exit status of `whiptail` was masked by the subsequent call to
`clear`.

This correct the capture of whiptail's exit status so that pressing the
`[Cancel]` button can be correctly detected by the script.

Fixes #7830
This commit is contained in:
Jérôme Augé 2022-04-08 14:05:34 +02:00 committed by Jonathan White
parent f15ee90429
commit 414cb5026c

View File

@ -122,9 +122,10 @@ BROWSER=$(whiptail \
"7" "Microsoft Edge" \ "7" "Microsoft Edge" \
3>&1 1>&2 2>&3) 3>&1 1>&2 2>&3)
exitstatus=$?
clear clear
exitstatus=$?
if [[ $exitstatus == 0 ]]; then if [[ $exitstatus == 0 ]]; then
# Configure settings for the chosen browser # Configure settings for the chosen browser
case $BROWSER in case $BROWSER in