From d273228663796578afc8c030d295fa75508e2749 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Mon, 16 Jun 2025 15:41:59 -0600 Subject: [PATCH] fix: version detection fails with qemu v10 The version check (>= 6.0.0) relied on the major version being just two digits. This change extracts the major version as a number and makes sure it's >= 6. --- quickemu | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/quickemu b/quickemu index baee457..c7b9704 100755 --- a/quickemu +++ b/quickemu @@ -1954,9 +1954,8 @@ if [ "${OS_KERNEL}" == "Darwin" ]; then fi QEMU_VER_LONG=$(${QEMU_IMG} --version | head -n 1 | awk '{print $3}') -# 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 +QEMU_VER_MAJOR=$(echo "${QEMU_VER_LONG}" | cut -d. -f1) +if [ "${QEMU_VER_MAJOR}" -lt 6 ]; then echo "ERROR! QEMU 6.0.0 or newer is required, detected ${QEMU_VER_LONG}." exit 1 fi