Sha256: 83b59db1eb81e19a88fc0877d115dd13b02ff74953410ec899ef988da0a98cb6

Contents?: true

Size: 501 Bytes

Versions: 10

Compression:

Stored size: 501 Bytes

Contents

module Vagrant
  module Actions
    module VM
      class Down < Base
        def prepare
          @runner.add_action(Halt) if @runner.vm.running?
          @runner.add_action(Destroy)
        end

        def after_halt
          # This sleep is necessary to wait for the GUI to clean itself up.
          # There appears to be nothing in the API that does this "wait"
          # for us.
          Kernel.sleep(1) if @runner.env.config.vm.boot_mode == "gui"
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
vagrantup-0.3.4 lib/vagrant/actions/vm/down.rb
vagrantup-0.3.3 lib/vagrant/actions/vm/down.rb
vagrantup-0.3.2 lib/vagrant/actions/vm/down.rb
vagrantup-0.3.1 lib/vagrant/actions/vm/down.rb
vagrantup-0.3.0 lib/vagrant/actions/vm/down.rb
vagrant-0.3.4 lib/vagrant/actions/vm/down.rb
vagrant-0.3.3 lib/vagrant/actions/vm/down.rb
vagrant-0.3.2 lib/vagrant/actions/vm/down.rb
vagrant-0.3.1 lib/vagrant/actions/vm/down.rb
vagrant-0.3.0 lib/vagrant/actions/vm/down.rb