Class: VagrantPlugins::Utm::Action::CheckQemuImg
- Inherits:
-
Object
- Object
- VagrantPlugins::Utm::Action::CheckQemuImg
- Defined in:
- lib/vagrant_utm/action/check_qemu_img.rb
Overview
This action checks if qemu-img is installed.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ CheckQemuImg
constructor
A new instance of CheckQemuImg.
Constructor Details
#initialize(app, _env) ⇒ CheckQemuImg
Returns a new instance of CheckQemuImg.
8 9 10 |
# File 'lib/vagrant_utm/action/check_qemu_img.rb', line 8 def initialize(app, _env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/vagrant_utm/action/check_qemu_img.rb', line 12 def call(env) qemu_img_present = Vagrant::Util::Which.which("qemu-img") raise Errors::QemuImgRequired unless qemu_img_present @app.call(env) end |