core: output UI when checksumming

This commit is contained in:
Mitchell Hashimoto 2013-12-01 22:39:34 -08:00
parent 1094ac976e
commit 84ea952df3
2 changed files with 5 additions and 1 deletions

View File

@ -19,7 +19,7 @@ module Vagrant
@download_interrupted = false
# Determine the checksum type to use
checksum = env[:box_checksum]
checksum = env[:box_checksum] || ""
checksum_klass = case env[:box_checksum_type]
when nil
nil
@ -65,6 +65,8 @@ module Vagrant
@logger.info("Validating checksum with #{checksum_klass}")
@logger.info("Expected checksum: #{checksum}")
env[:ui].info(I18n.t("vagrant.actions.box.add.checksumming",
name: env[:box_name]))
actual = FileChecksum.new(@temp_path, checksum_klass).checksum
if actual != checksum
raise Errors::BoxChecksumMismatch,

View File

@ -1133,6 +1133,8 @@ en:
Extracting box...
added: |-
Successfully added box '%{name}' with provider '%{provider}'!
checksumming: |-
Calculating and comparing box checksum...
destroy:
destroying: "Deleting box '%{name}'..."
download: