The `target_vms` helper in multivm with no name specified will return all VMs, not the hash [closes GH-148]
This commit is contained in:
parent
27d5ffa3d6
commit
83b2872ddb
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue