Sha256: 5ac52b17f9f62d996c81cb1eb9bbbfcef0c5171afd54d80bba8ba648368c6728

Contents?: true

Size: 713 Bytes

Versions: 3

Compression:

Stored size: 713 Bytes

Contents

# frozen_string_literal: true

module VagrantPlugins
  module ProviderLocal
    module Command
      # This is used to restart the guest from inside the guest
      class RestartGuest < Vagrant.plugin('2', :command)
        def execute
          opts = OptionParser.new do |o|
            o.banner = 'Usage: vagrant local control restart [options]'
          end

          argv = parse_options(opts)
          return unless argv

          unless argv.empty?
            @env.ui.info(opts.help)
            return
          end

          ## Wait for VM up
          with_target_vms(argv, provider: :local) do |machine|
            machine.action('restart')
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vagrant-local-0.0.3 lib/vagrant-local/command/restart_guest.rb
vagrant-local-0.0.2 lib/vagrant-local/command/restart_guest.rb
vagrant-local-0.0.1 lib/vagrant-local/command/restart_guest.rb