core: clarify output for boxadd error message

This commit is contained in:
Mitchell Hashimoto 2014-01-23 17:08:28 -08:00
parent 0fceed6ff4
commit acc57a3c18
3 changed files with 7 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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: |-