Backwards compatible with_target_vms, fix failing test
This commit is contained in:
parent
ff36845259
commit
351f9757a1
|
@ -71,6 +71,10 @@ module Vagrant
|
|||
# Setup the options hash
|
||||
options ||= {}
|
||||
|
||||
# Require that names be an array
|
||||
names ||= []
|
||||
names = [names] if !names.is_a?(Array)
|
||||
|
||||
# First determine the proper array of VMs.
|
||||
vms = []
|
||||
if names.length > 0
|
||||
|
@ -96,7 +100,7 @@ module Vagrant
|
|||
else
|
||||
vms = @env.vms_ordered
|
||||
end
|
||||
|
||||
|
||||
# Make sure we're only working with one VM if single target
|
||||
raise Errors::MultiVMTargetRequired if options[:single_target] && vms.length != 1
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ module Vagrant
|
|||
end
|
||||
|
||||
def package_target(name, options)
|
||||
with_target_vms([ name ], :single_target => true) do |vm|
|
||||
with_target_vms(name, :single_target => true) do |vm|
|
||||
raise Errors::VMNotCreatedError if !vm.created?
|
||||
@logger.debug("Packaging VM: #{vm.name}")
|
||||
package_vm(vm, options)
|
||||
|
|
Loading…
Reference in New Issue