Give a success message after adding a box

This commit is contained in:
Mitchell Hashimoto 2013-03-13 21:24:03 -07:00
parent dea881cad2
commit 82d8285df6
2 changed files with 8 additions and 1 deletions

View File

@ -30,8 +30,9 @@ module Vagrant
# Add the box
env[:ui].info I18n.t("vagrant.actions.box.add.adding", :name => env[:box_name])
added_box = nil
begin
env[:box_collection].add(
added_box = env[:box_collection].add(
@temp_path, env[:box_name], env[:box_provider], env[:box_force])
rescue Vagrant::Errors::BoxUpgradeRequired
# Upgrade the box
@ -45,6 +46,10 @@ module Vagrant
# downloaded temporary file.
recover(env)
# Success, we added a box!
env[:ui].success(
I18n.t("vagrant.actions.box.add.added", name: added_box.name, provider: added_box.provider))
# Carry on!
@app.call(env)
end

View File

@ -792,6 +792,8 @@ en:
add:
adding: |-
Extracting box...
added: |-
Successfully added box '%{name}' with provider '%{provider}'!
destroy:
destroying: "Deleting box '%{name}'..."
download: