From acc57a3c18e961ed5989e6261f01f6851ce570e6 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 23 Jan 2014 17:08:28 -0800 Subject: [PATCH] core: clarify output for boxadd error message --- lib/vagrant/action/builtin/box_add.rb | 2 ++ plugins/commands/box/command/add.rb | 2 +- templates/locales/en.yml | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/vagrant/action/builtin/box_add.rb b/lib/vagrant/action/builtin/box_add.rb index 246797532..5b8be6336 100644 --- a/lib/vagrant/action/builtin/box_add.rb +++ b/lib/vagrant/action/builtin/box_add.rb @@ -76,11 +76,13 @@ module Vagrant if !provider raise Errors::BoxAddNoMatchingVersion, constraints: version || ">= 0", + name: metadata.name, url: url, versions: metadata.versions.join(", ") else # TODO: show supported providers raise Errors::BoxAddNoMatchingProvider, + name: metadata.name, requested: provider, url: url end diff --git a/plugins/commands/box/command/add.rb b/plugins/commands/box/command/add.rb index 3d32596bf..c94e10013 100644 --- a/plugins/commands/box/command/add.rb +++ b/plugins/commands/box/command/add.rb @@ -36,7 +36,7 @@ module VagrantPlugins options[:provider] = p end - o.on("--version VALUE", String, "Constrain version of the added box") do |v| + o.on("--box-version VALUE", String, "Constrain version of the added box") do |v| options[:version] = v end diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 7ee1a2c7c..d42bfbbf1 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -221,14 +221,16 @@ en: provider. Double-check your requested provider to verify you didn't simply misspell it. - Box: %{url} + Name: %{name} + Address: %{url} Requested provider: %{requested} box_add_no_matching_version: |- The box you're attempting to add has no available version that matches the constraints you requested. Please double-check your settings. - Box: %{url} + Box: %{name} + Address: %{url} Constraints: %{constraints} Available versions: %{versions} boot_bad_state: |-