Sha256: d24ed70c9cb36fa8ed3c5c95763173d56af8a65117b480e498cfa0ca40fa0045

Contents?: true

Size: 512 Bytes

Versions: 82

Compression:

Stored size: 512 Bytes

Contents

module VagrantPlugins
  module ProviderVirtualBox
    module Action
      # This middleware checks that the VM is running, and raises an exception
      # if it is not, notifying the user that the VM must be running.
      class CheckRunning
        def initialize(app, env)
          @app = app
        end

        def call(env)
          if env[:machine].state.id != :running
            raise Vagrant::Errors::VMNotRunningError
          end

          @app.call(env)
        end
      end
    end
  end
end

Version data entries

82 entries across 75 versions & 13 rubygems

Version Path
vagrant-actionio-0.0.9 vendor/bundle/bundler/gems/vagrant-c74251a1d9c0/plugins/providers/virtualbox/action/check_running.rb
vagrant-lxc-0.0.1 vendor/vagrant/plugins/providers/virtualbox/action/check_running.rb