Remove nil defaults

This commit is contained in:
Mitchell Hashimoto 2012-01-11 22:34:36 -08:00
parent 60b6d9ca9f
commit 5c70dd1658
2 changed files with 2 additions and 3 deletions

View File

@ -15,11 +15,8 @@ module Vagrant
def initialize
@shell = "bash"
@port = nil
@guest_port = nil
@forward_agent = false
@forward_x11 = false
@private_key_path = nil
end
def forwarded_port_key=(value)

View File

@ -362,6 +362,8 @@ module Vagrant
end
def ssh_port(expected_port)
@logger.debug("Searching for SSH port: #{expected_port.inspect}")
# Look for the forwarded port only by comparing the guest port
read_forwarded_ports.each do |_, _, hostport, guestport|
return hostport if guestport == expected_port