lib/vagrant/action/builtin/box_add.rb in vagrant-unbundled-2.2.6.2 vs lib/vagrant/action/builtin/box_add.rb in vagrant-unbundled-2.2.7.0

- old
+ new

@@ -346,12 +346,18 @@ box_url = nil end end if opts[:checksum] && opts[:checksum_type] - env[:ui].detail(I18n.t("vagrant.actions.box.add.checksumming")) - validate_checksum( - opts[:checksum_type], opts[:checksum], box_url) + if opts[:checksum].to_s.strip.empty? + @logger.warn("Given checksum is empty, cannot validate checksum for box") + elsif opts[:checksum_type].to_s.strip.empty? + @logger.warn("Given checksum type is empty, cannot validate checksum for box") + else + env[:ui].detail(I18n.t("vagrant.actions.box.add.checksumming")) + validate_checksum( + opts[:checksum_type], opts[:checksum], box_url) + end end # Add the box! box = env[:box_collection].add( box_url, name, version,