Sha256: ee7d371ebb7b09ef9d8268a0ec2520868d2fb7fc98ad4c1318afc5d6ca7ce07a
Contents?: true
Size: 1.07 KB
Versions: 47
Compression:
Stored size: 1.07 KB
Contents
module Vagrant class Action module VM # Middleware which verifies that the VM has the proper guest additions # installed and prints a warning if they're not detected or if the # version does not match the installed VirtualBox version. class CheckGuestAdditions def initialize(app, env) @app = app end def call(env) # Use the raw interface for now, while the virtualbox gem # doesn't support guest properties (due to cross platform issues) version = env["vm"].vm.interface.get_guest_property_value("/VirtualBox/GuestAdd/Version") if version.empty? env.ui.warn I18n.t("vagrant.actions.vm.check_guest_additions.not_detected") elsif version != VirtualBox.version env.ui.warn(I18n.t("vagrant.actions.vm.check_guest_additions.version_mismatch", :guest_version => version, :virtualbox_version => VirtualBox.version)) end # Continue @app.call(env) end end end end end
Version data entries
47 entries across 47 versions & 4 rubygems