fix for qemu-img error on new installs (#1134)

make sure a disk exists before trying to check it
This commit is contained in:
Alex Genovese 2024-05-02 12:23:54 +02:00 committed by GitHub
parent 9a09badfe5
commit 52a5e5f4ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1831,7 +1831,7 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
fi
# Set the default disk_format if not provided by user
if [ -z "${disk_format}" ]; then
if [ -z "${disk_format}" ] && [ -e "${disk_img}" ]; then
disk_format=$(${QEMU_IMG} info "${disk_img}" | grep 'file format' | cut -d ':' -f 2 | tr -cd '[:graph:]')
fi