Ask for a different disk if not found

This commit is contained in:
Manuel Thalmann 2024-06-26 18:13:07 +02:00
parent f9555d8468
commit 35aee03b9c

View file

@ -161,8 +161,26 @@
if osDisk && config.devicePath == null then ''
${diskSelector}
''
else ''
local ${diskVarName}=${config.devicePath}
${if osDisk then ''
. ${./../../../scripts/Common/Scripts/is-truthy.sh}
if [ ! -b ${diskVar} ]; then
function fallback() {
echo "Couldn't find the specified disk \"${diskVar}\"."
echo "Do you want to install the OS on another disk?"
local answer
read answer
if isTruthy "$answer"; then
${diskSelector}
else
"local ${diskVarName}=${config.devicePath}"}
exit 1
fi
}
fallback;
fi
'' else ""}
''}
${if (!config.wipe) then cleanup else ""}