Convert provider to symbol only if non-nil

This commit is contained in:
Mitchell Hashimoto 2012-12-30 18:08:07 -10:00
parent 20253c4c4f
commit f428b288f3
1 changed files with 2 additions and 1 deletions

View File

@ -98,7 +98,8 @@ module Vagrant
# #
get_machine = lambda do |name| get_machine = lambda do |name|
# Check for an active machine with the same name # Check for an active machine with the same name
provider_to_use = options[:provider].to_sym provider_to_use = options[:provider]
provider_to_use = provider_to_use.to_sym if provider_to_use
@env.active_machines.each do |active_name, active_provider| @env.active_machines.each do |active_name, active_provider|
if name == active_name if name == active_name