From 4e09e5a8d696347b9ca33205dfd67615f8e609b0 Mon Sep 17 00:00:00 2001 From: Lennart Pieperjohanns <95208734+lennartpj@users.noreply.github.com> Date: Sun, 29 Sep 2024 21:28:24 +0200 Subject: [PATCH] Allow 'y', 'yes', and case-insensitive variants for confirmation --- core/tabs/utils/create-bootable-usb.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/tabs/utils/create-bootable-usb.sh b/core/tabs/utils/create-bootable-usb.sh index 1abc9e82..8539201b 100644 --- a/core/tabs/utils/create-bootable-usb.sh +++ b/core/tabs/utils/create-bootable-usb.sh @@ -170,7 +170,8 @@ write_iso(){ printf "%b" "${RED}WARNING: This will erase all data on ${USB_DEVICE}. Are you sure you want to continue? (y/N): ${RC}" read -r CONFIRMATION - if [ "$CONFIRMATION" != "yes" ]; then + # Convert the input to lowercase and compare + if [ "$(echo "$CONFIRMATION" | tr '[:upper:]' '[:lower:]')" != "yes" ] && [ "$(echo "$CONFIRMATION" | tr '[:upper:]' '[:lower:]')" != "y" ]; then printf "%b\n" "${YELLOW}Operation cancelled.${RC}" exit 1 fi @@ -204,4 +205,4 @@ write_iso(){ checkEnv checkEscalationTool -write_iso \ No newline at end of file +write_iso