From c1f53a4ace1a29309032952da3c9bc658314fda0 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 9 Apr 2013 08:47:52 -0700 Subject: [PATCH] ssh-config doesn't raise exception when VB machine not created [GH-1562] --- CHANGELOG.md | 2 ++ plugins/providers/virtualbox/provider.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c6aaabd9..229372082 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,8 @@ BUG FIXES: environments. [GH-1545] - Networks come back up properly on RedHat systems after reboot. [GH-921] - `config.ssh` settings override all detected SSH settings (regression). [GH-1479] + - `ssh-config` won't raise an exception if the VirtualBox machine + is not created. [GH-1562] ## 1.1.6 (April 3, 2013) diff --git a/plugins/providers/virtualbox/provider.rb b/plugins/providers/virtualbox/provider.rb index 1e4bdce45..61c7a5ef5 100644 --- a/plugins/providers/virtualbox/provider.rb +++ b/plugins/providers/virtualbox/provider.rb @@ -45,7 +45,7 @@ module VagrantPlugins def ssh_info # If the VM is not created then we cannot possibly SSH into it, so # we return nil. - return nil if state == :not_created + return nil if state.id == :not_created # Return what we know. The host is always "127.0.0.1" because # VirtualBox VMs are always local. The port we try to discover