Don't forward ports if there aren't any to forward
This commit is contained in:
parent
63bd380778
commit
a25a691913
|
@ -4,6 +4,7 @@
|
||||||
- `vagrant ssh` does a direct `exec()` syscall now instead of going through
|
- `vagrant ssh` does a direct `exec()` syscall now instead of going through
|
||||||
the shell. This makes it so things like shell expansion oddities no longer
|
the shell. This makes it so things like shell expansion oddities no longer
|
||||||
cause problems. [GH-715]
|
cause problems. [GH-715]
|
||||||
|
- Fix crashing case if there are no ports to forward.
|
||||||
|
|
||||||
## 0.9.5 (February 5, 2012)
|
## 0.9.5 (February 5, 2012)
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,10 @@ module Vagrant
|
||||||
ports << options.merge(:name => options[:name], :adapter => options[:adapter])
|
ports << options.merge(:name => options[:name], :adapter => options[:adapter])
|
||||||
end
|
end
|
||||||
|
|
||||||
@env[:vm].driver.forward_ports(ports)
|
if !ports.empty?
|
||||||
|
# We only need to forward ports if there are any to forward
|
||||||
|
@env[:vm].driver.forward_ports(ports)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -144,7 +144,7 @@ module Vagrant
|
||||||
pf_builder.join(",")])
|
pf_builder.join(",")])
|
||||||
end
|
end
|
||||||
|
|
||||||
execute("modifyvm", @uuid, *args)
|
execute("modifyvm", @uuid, *args) if !args.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
def halt
|
def halt
|
||||||
|
|
|
@ -144,7 +144,7 @@ module Vagrant
|
||||||
pf_builder.join(",")])
|
pf_builder.join(",")])
|
||||||
end
|
end
|
||||||
|
|
||||||
execute("modifyvm", @uuid, *args)
|
execute("modifyvm", @uuid, *args) if !args.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
def halt
|
def halt
|
||||||
|
|
Loading…
Reference in New Issue