diff --git a/lib/vagrant/command/helpers.rb b/lib/vagrant/command/helpers.rb index 7a398d99f..bbf39a3d2 100644 --- a/lib/vagrant/command/helpers.rb +++ b/lib/vagrant/command/helpers.rb @@ -12,7 +12,7 @@ module Vagrant @target_vms ||= begin if env.multivm? - return env.vms if !self.name + return env.vms.values if !self.name vm = env.vms[self.name.to_sym] raise VMNotFoundError.new("A VM by the name of `#{self.name}` was not found.") if !vm else diff --git a/test/vagrant/command/helpers_test.rb b/test/vagrant/command/helpers_test.rb index 21fbf6d43..57229f849 100644 --- a/test/vagrant/command/helpers_test.rb +++ b/test/vagrant/command/helpers_test.rb @@ -67,7 +67,7 @@ class CommandHelpersTest < Test::Unit::TestCase should "return all the VMs if no name is specified" do instance = command([], @env) - assert_equal @env.vms, instance.target_vms + assert_equal @env.vms.values, instance.target_vms end should "return only the specified VM if a name is given" do