From c643aa1513c2169402a1ad4228cb9cf97b673753 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 24 Jun 2010 10:35:32 -0700 Subject: [PATCH] Fix issue with VirtualBox.version being nil in forked process --- lib/vagrant/ssh.rb | 3 ++- vagrant.gemspec | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/ssh.rb b/lib/vagrant/ssh.rb index 732ec5dc3..d78c92b0c 100644 --- a/lib/vagrant/ssh.rb +++ b/lib/vagrant/ssh.rb @@ -24,6 +24,7 @@ module Vagrant end options = {} + options[:port] = port(opts) [:host, :username, :private_key_path].each do |param| options[param] = opts[param] || env.config.ssh.send(param) end @@ -35,7 +36,7 @@ module Vagrant # we simply exec. pid = nil 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 end diff --git a/vagrant.gemspec b/vagrant.gemspec index 57df0184f..a21c668c8 100644 --- a/vagrant.gemspec +++ b/vagrant.gemspec @@ -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.authors = ["Mitchell Hashimoto", "John Bender"] - s.date = %q{2010-06-23} + s.date = %q{2010-06-24} s.default_executable = %q{vagrant} 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"]