Sha256: 92b4aba898315ccde9d873d7ca7659b9e340569874e1bd9410350530b804993e
Contents?: true
Size: 773 Bytes
Versions: 40
Compression:
Stored size: 773 Bytes
Contents
module Vagrant module Action module VM class Halt def initialize(app, env, options=nil) @app = app env.merge!(options || {}) end def call(env) if env[:vm].state == :running if !env["force"] env[:ui].info I18n.t("vagrant.actions.vm.halt.graceful") env[:vm].guest.halt end if env[:vm].state != :poweroff env[:ui].info I18n.t("vagrant.actions.vm.halt.force") env[:vm].driver.halt end # Sleep for a second to verify that the VM properly # cleans itself up sleep 1 if !env["vagrant.test"] end @app.call(env) end end end end end
Version data entries
40 entries across 40 versions & 6 rubygems