fix: Ignore missing custom .iso after install

This commit is contained in:
Kroese 2025-04-02 22:17:51 +02:00 committed by GitHub
parent 81e9fff270
commit 3d62989859
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -200,13 +200,19 @@ abortInstall() {
detectCustom() { detectCustom() {
local file base local dir file base
local fname="custom.iso" local fname="custom.iso"
local boot="$STORAGE/windows.boot"
CUSTOM="" CUSTOM=""
if [ -d "/$fname" ]; then dir=$(find / -maxdepth 1 -type d -iname "$fname" | head -n 1)
error "The file /$fname does not exist, please make sure that you mapped it to a valid path!" && return 1 [ ! -d "$dir" ] && dir=$(find "$STORAGE" -maxdepth 1 -type d -iname "$fname" | head -n 1)
if [ -d "$dir" ]; then
if ! hasDisk || [ ! -f "$boot" ]; then
error "The bind $dir maps to a file that does not exist!" && return 1
fi
fi fi
file=$(find / -maxdepth 1 -type f -iname "$fname" | head -n 1) file=$(find / -maxdepth 1 -type f -iname "$fname" | head -n 1)