fix(quickemu): correctly handle version 10.0.0 of QEMU

This commit is contained in:
spameier 2025-04-30 16:18:53 +02:00 committed by Liam
parent 6b51f740a4
commit f25205f451
1 changed files with 2 additions and 1 deletions

View File

@ -1954,7 +1954,8 @@ if [ "${OS_KERNEL}" == "Darwin" ]; then
fi
QEMU_VER_LONG=$(${QEMU_IMG} --version | head -n 1 | awk '{print $3}')
QEMU_VER_SHORT=$(echo "${QEMU_VER_LONG//./}" | cut -c1-2)
# strip patch version and remove dots. 6.0.0 => 60 / 10.0.0 => 100
QEMU_VER_SHORT=$(echo "${QEMU_VER_LONG%.*}" | sed 's/\.//g')
if [ "${QEMU_VER_SHORT}" -lt 60 ]; then
echo "ERROR! QEMU 6.0.0 or newer is required, detected ${QEMU_VER_LONG}."
exit 1