From ed57045d6dd80e5f507fc15e5ceae806625ac180 Mon Sep 17 00:00:00 2001 From: Alexander Jung Date: Sun, 16 Jul 2023 09:06:59 +0000 Subject: [PATCH] fix(qemu): Handle parsing version commands properly This commit fixes an issue where the output version does not have a space between the distribution and the version. GitHub-Fixes: #637 Signed-off-by: Alexander Jung --- machine/qemu/qemu_version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine/qemu/qemu_version.go b/machine/qemu/qemu_version.go index 6a2dd2da6..63aca40ef 100644 --- a/machine/qemu/qemu_version.go +++ b/machine/qemu/qemu_version.go @@ -63,5 +63,5 @@ func GetQemuVersionFromBin(ctx context.Context, bin string) (*semver.Version, er // Some QEMU versions include the OS distribution that it was compiled for // after the version number (surrounded by brackets). In every case, just // split the string and gather everything before the first bracket. - return semver.NewVersion(strings.TrimSpace(strings.Split(ret, " (")[0])) + return semver.NewVersion(strings.TrimSpace(strings.Split(ret, "(")[0])) }