Sha256: 2494d66ed7e0e7c71cf7705364423943dbec2d08e562f37258ef552989c533fa

Contents?: true

Size: 867 Bytes

Versions: 5

Compression:

Stored size: 867 Bytes

Contents

module VagrantPlugins
  module Parallels
    module Action
      class CheckGuestTools
        def initialize(app, env)
          @app = app
        end

        def call(env)
          tools_version = env[:machine].provider.driver.read_guest_tools_version
          if !tools_version
            env[:ui].warn I18n.t("vagrant_parallels.actions.vm.check_guest_tools.not_detected")
          else
            pd_version = env[:machine].provider.driver.version
            unless pd_version.start_with? tools_version
              env[:ui].warn(I18n.t("vagrant_parallels.actions.vm.check_guest_tools.version_mismatch",
                                   tools_version: tools_version,
                                   parallels_version: pd_version))
            end
          end

          # Continue
          @app.call(env)
        end

      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vagrant-parallels-0.2.1 lib/vagrant-parallels/action/check_guest_tools.rb
vagrant-parallels-0.2.0 lib/vagrant-parallels/action/check_guest_tools.rb
vagrant-parallels-0.1.3 lib/vagrant-parallels/action/check_guest_tools.rb
vagrant-parallels-0.1.2 lib/vagrant-parallels/action/check_guest_tools.rb
vagrant-parallels-0.1.1 lib/vagrant-parallels/action/check_guest_tools.rb