Skip to content

Commit

Permalink
Fixed inaccurate downloading status message
Browse files Browse the repository at this point in the history
Importing a base box from the local file system currently outputs 'Downloading: file://...' which is more accurate now by presenting it as: 'Unpacking necessary files from: file://...'.
Fixes hashicorp#5386.
  • Loading branch information
Tim Rensen committed Feb 25, 2015
1 parent 92762ee commit 6c2cc31
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/vagrant/action/builtin/box_add.rb
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,15 @@ def download(url, env, **opts)
show_url = opts[:show_url]
show_url ||= url

textLoading = "vagrant.box_downloading"

# Adjust status message when 'downloading' a local box.
if(show_url.start_with?('file://'))
textLoading = "vagrant.box_unpacking"
end

env[:ui].detail(I18n.t(
"vagrant.box_downloading",
textLoading,
url: show_url))
if File.file?(d.destination)
env[:ui].info(I18n.t("vagrant.actions.box.download.resuming"))
Expand Down
2 changes: 2 additions & 0 deletions templates/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ en:
Downloading: %{url}
box_download_error: |-
Error downloading: %{message}
box_unpacking: |-
Unpacking necessary files from: %{url}
box_expanding_url: |-
URL: %{url}
box_loading_metadata: |-
Expand Down

0 comments on commit 6c2cc31

Please sign in to comment.