From 12b81600fbe0efd32e40e8b8ed7738b0816e32cb Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 24 Dec 2015 12:24:47 -0800 Subject: [PATCH] commands/up: check machine index for provider --- plugins/commands/up/command.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/commands/up/command.rb b/plugins/commands/up/command.rb index 7573a088a..9fce51b8c 100644 --- a/plugins/commands/up/command.rb +++ b/plugins/commands/up/command.rb @@ -129,7 +129,17 @@ module VagrantPlugins # Most likely this will be a set of one. providers = Set.new 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 # Go through and determine if we can install the providers