From 10a051a64bdfff47e1ed372616f4f288638d8ca8 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 16 Jan 2013 22:52:44 -0800 Subject: [PATCH] box add works even if no provider is set --- plugins/commands/box/command/add.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/commands/box/command/add.rb b/plugins/commands/box/command/add.rb index 37daf7e4e..863444eab 100644 --- a/plugins/commands/box/command/add.rb +++ b/plugins/commands/box/command/add.rb @@ -33,9 +33,13 @@ module VagrantPlugins existing.destroy! if existing end + # Get the provider if one was set + provider = nil + provider = options[:provider].to_sym if options[:provider] + @env.action_runner.run(Vagrant::Action.action_box_add, { :box_name => argv[0], - :box_provider => options[:provider].to_sym, + :box_provider => provider, :box_url => argv[1] })