Don't error check the "exit" call to SSH
This commit is contained in:
parent
8482eeff0b
commit
55b7321f2b
|
@ -20,17 +20,20 @@ module Vagrant
|
|||
def shell
|
||||
session.shell do |sh|
|
||||
sh.on_process_run do |sh, process|
|
||||
# Enable error checking by default
|
||||
process.properties[:error_check] = true if !process.properties.has_key?(:error_check)
|
||||
|
||||
process.on_finish do |p|
|
||||
# By default when a process finishes we want to check the exit
|
||||
# status so we can properly raise an exception
|
||||
self.check_exit_status(p.exit_status, p.command, p.properties)
|
||||
self.check_exit_status(p.exit_status, p.command, p.properties) if p.properties[:error_check]
|
||||
end
|
||||
end
|
||||
|
||||
yield sh
|
||||
|
||||
# Exit and wait. We don't run shell commands in the background.
|
||||
sh.execute "exit"
|
||||
sh.execute "exit", :error_check => false
|
||||
sh.wait!
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue