sciurus / vagrant-mutate

Convert vagrant boxes to work with different providers
MIT License
281 stars 41 forks source link

Fix qemu-img version check. #58

Closed 3onyc closed 10 years ago

3onyc commented 10 years ago

qemu-img version: 2.1.0

Version check was failing for qemu-img as executing it without any arguments returns the following:

qemu-img: Not enough arguments
Try 'qemu-img --help' for more information

Fixed by using qemu-img --version

Note: Not certain this also works in previous versions of qemu-img.

Additionally there were 2 test failures but they're unrelated to this change (Tests didn't run at all due to version check failing)

TESTS FAILED
These two files do not match <snip>/test/actual_output/virtualbox/boxes/mutate-test/0/kvm/box-disk1.img <snip>/test/expected_output/virtualbox/kvm/box-disk1.img
These two files do not match <snip>/test/actual_output/virtualbox/boxes/mutate-test/0/libvirt/box.img <snip>/test/expected_output/virtualbox/libvirt/box.img
sciurus commented 10 years ago

Earlier versions don't seem to pose a problem to this fix. Calling qemu-img --version in 1.50 behaves the same as calling just qemu-img.

3onyc commented 10 years ago

@sciurus Regarding the failed tests, are they outdated or?

sciurus commented 10 years ago

The tests pass for me. If they still fail for you, please send me the diff between actual and expected output.