providers/virtualbox: no SSH info if not running
This commit is contained in:
parent
03e18d1668
commit
2694f746a7
|
@ -56,9 +56,8 @@ module VagrantPlugins
|
||||||
|
|
||||||
# Returns the SSH info for accessing the VirtualBox VM.
|
# Returns the SSH info for accessing the VirtualBox VM.
|
||||||
def ssh_info
|
def ssh_info
|
||||||
# If the VM is not created then we cannot possibly SSH into it, so
|
# If the VM is not running that we can't possibly SSH into it
|
||||||
# we return nil.
|
return nil if state.id != :running
|
||||||
return nil if state.id == :not_created
|
|
||||||
|
|
||||||
# Return what we know. The host is always "127.0.0.1" because
|
# Return what we know. The host is always "127.0.0.1" because
|
||||||
# VirtualBox VMs are always local. The port we try to discover
|
# VirtualBox VMs are always local. The port we try to discover
|
||||||
|
|
Loading…
Reference in New Issue