From 94960c20dfd0f6e1cfe78349d0f5dc36340f3ac3 Mon Sep 17 00:00:00 2001
From: Manuel Thalmann <m@nuth.ch>
Date: Fri, 7 Apr 2023 02:13:23 +0200
Subject: [PATCH] Ask for disk if the specified one does not exist

---
 scripts/Arch/OS/partition.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Arch/OS/partition.sh b/scripts/Arch/OS/partition.sh
index 49d70e80..5056e886 100755
--- a/scripts/Arch/OS/partition.sh
+++ b/scripts/Arch/OS/partition.sh
@@ -5,7 +5,7 @@ ARCH_DISK="${ARCH_DISK}";
 memory="$(cat /proc/meminfo | awk -F " " '/^MemTotal/ { print $2 }')";
 swapSize="$(echo "$memory" | awk '{ print int(($1 / 1024 / 1024 4) + 0.5)}')";
 
-if [ -z "$ARCH_DISK" ]
+if [ -z "$ARCH_DISK" ] || [ ! -e "/dev/$ARCH_DISK" ]
 then
     chooseDisk ARCH_DISK "Which disk do you wish to format for installing Arch?";
 fi;