lib/vagrant/ssh.rb in vagrant-0.7.0.beta2 vs lib/vagrant/ssh.rb in vagrant-0.7.0
- old
+ new
@@ -140,12 +140,11 @@
perms.reverse[0..2].reverse
end
# Returns the port which is either given in the options hash or taken from
# the config by finding it in the forwarded ports hash based on the
- # `config.ssh.forwarded_port_key` or use the default port given by `config.ssh.port`
- # when port forwarding isn't used.
+ # `config.ssh.forwarded_port_key`.
def port(opts={})
# Check if port was specified in options hash
pnum = opts[:port]
return pnum if pnum
@@ -159,10 +158,10 @@
break if pnum
end
return pnum.hostport if pnum
- # Fall back to the default
- return env.config.ssh.port
+ # This should NEVER happen.
+ raise Errors::SSHPortNotDetected
end
end
end