commands/up: check machine index for provider

This commit is contained in:
Mitchell Hashimoto 2015-12-24 12:24:47 -08:00
parent 0de44a116b
commit 12b81600fb
1 changed files with 11 additions and 1 deletions

View File

@ -129,7 +129,17 @@ module VagrantPlugins
# Most likely this will be a set of one. # Most likely this will be a set of one.
providers = Set.new providers = Set.new
names.each do |name| names.each do |name|
providers.add(@env.default_provider(machine: name.to_sym, check_usable: false)) # Check if we have this machine in the index
entry = @env.machine_index.get(name.to_s)
# Get the provider for this machine
provider = nil
provider = entry.provider.to_sym if entry
provider = @env.default_provider(
machine: name.to_sym, check_usable: false) if !provider
# Add it to the set
providers.add(provider)
end end
# Go through and determine if we can install the providers # Go through and determine if we can install the providers