Skip to content

Commit

Permalink
fix(qemu): Handle parsing version commands properly (#638)
Browse files Browse the repository at this point in the history
Reviewed-by: Cezar Craciunoiu <[email protected]>
Approved-by: Cezar Craciunoiu <[email protected]>
  • Loading branch information
craciunoiuc authored Jul 17, 2023
2 parents 6947688 + ed57045 commit 42d1d32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion machine/qemu/qemu_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
}

0 comments on commit 42d1d32

Please sign in to comment.