Class: HashiCorp::VagrantVMwareDesktop::Action::CheckVMware

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/vagrant-vmware-desktop/action/check_vmware.rb

Overview

This class checks to verify that VMware is properly installed and configured in such a way that Vagrant can use it.

Instance Method Summary collapse

Methods included from Common

#to_s

Constructor Details

#initialize(app, env) ⇒ CheckVMware

Returns a new instance of CheckVMware.



9
10
11
# File 'lib/vagrant-vmware-desktop/action/check_vmware.rb', line 9

def initialize(app, env)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/vagrant-vmware-desktop/action/check_vmware.rb', line 13

def call(env)
  if !env[:check_vmware_complete]
    # Tell the provider to verify itself.
    env[:machine].provider.driver.verify!

    # Mark that we completed it so we only do that once
    env[:check_vmware_complete] = true
  end

  # Carry on
  @app.call(env)
end