From 414cb5026cdb2b9ce9e3d493dd17105b31946345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Aug=C3=A9?= Date: Fri, 8 Apr 2022 14:05:34 +0200 Subject: [PATCH] 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 --- utils/keepassxc-snap-helper.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/keepassxc-snap-helper.sh b/utils/keepassxc-snap-helper.sh index fac546212..e4af458fa 100755 --- a/utils/keepassxc-snap-helper.sh +++ b/utils/keepassxc-snap-helper.sh @@ -122,9 +122,10 @@ BROWSER=$(whiptail \ "7" "Microsoft Edge" \ 3>&1 1>&2 2>&3) +exitstatus=$? + clear -exitstatus=$? if [[ $exitstatus == 0 ]]; then # Configure settings for the chosen browser case $BROWSER in