Sha256: a72fa6c8e71a70d593a854b34df47bb72c64da0b90985540c1ea1f05a24ef59c

Contents?: true

Size: 507 Bytes

Versions: 21

Compression:

Stored size: 507 Bytes

Contents

# rubocop:disable Style/RedundantBegin
# rubocop:disable Lint/HandleExceptions
#
# FIXME: address disabled warnings
#
module VagrantPlugins
  module GuestAlpine
    module Cap
      class Halt
        def self.halt(machine)
          begin
            machine.communicate.sudo('poweroff')
          rescue Net::SSH::Disconnect, IOError
            # Ignore, this probably means connection closed because it
            # shut down and SSHd was stopped.
          end
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 4 rubygems

Version Path
vagrant-alpine-0.1.1 lib/vagrant-alpine/cap/halt.rb