Fix issue with VirtualBox.version being nil in forked process

This commit is contained in:
Mitchell Hashimoto 2010-06-24 10:35:32 -07:00
parent 763389ac4e
commit c643aa1513
2 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@ module Vagrant
end end
options = {} options = {}
options[:port] = port(opts)
[:host, :username, :private_key_path].each do |param| [:host, :username, :private_key_path].each do |param|
options[param] = opts[param] || env.config.ssh.send(param) options[param] = opts[param] || env.config.ssh.send(param)
end end
@ -35,7 +36,7 @@ module Vagrant
# we simply exec. # we simply exec.
pid = nil pid = nil
pid = fork if Util::Platform.leopard? pid = fork if Util::Platform.leopard?
Kernel.exec "ssh -p #{port(opts)} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i #{options[:private_key_path]} #{options[:username]}@#{options[:host]}".strip if pid.nil? Kernel.exec "ssh -p #{options[:port]} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i #{options[:private_key_path]} #{options[:username]}@#{options[:host]}".strip if pid.nil?
Process.wait(pid) if pid Process.wait(pid) if pid
end end

View File

@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version= s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
s.authors = ["Mitchell Hashimoto", "John Bender"] s.authors = ["Mitchell Hashimoto", "John Bender"]
s.date = %q{2010-06-23} s.date = %q{2010-06-24}
s.default_executable = %q{vagrant} s.default_executable = %q{vagrant}
s.description = %q{Vagrant is a tool for building and distributing virtualized development environments.} s.description = %q{Vagrant is a tool for building and distributing virtualized development environments.}
s.email = ["mitchell.hashimoto@gmail.com", "john.m.bender@gmail.com"] s.email = ["mitchell.hashimoto@gmail.com", "john.m.bender@gmail.com"]