diff --git a/lib/vagrant/downloaders/http.rb b/lib/vagrant/downloaders/http.rb index ebc0fd030..1207e688f 100644 --- a/lib/vagrant/downloaders/http.rb +++ b/lib/vagrant/downloaders/http.rb @@ -28,6 +28,8 @@ module Vagrant destination_file.write(segment) end end + + complete_progress end def report_progress(progress, total) @@ -35,6 +37,11 @@ module Vagrant print "#{CL_RESET}Download Progress: #{percent.to_i}% (#{progress} / #{total})" $stdout.flush end + + def complete_progress + # Just clear the line back out + print "#{CL_RESET}" + end end end end \ No newline at end of file diff --git a/test/vagrant/downloaders/http_test.rb b/test/vagrant/downloaders/http_test.rb index 769ce255d..b58fa2060 100644 --- a/test/vagrant/downloaders/http_test.rb +++ b/test/vagrant/downloaders/http_test.rb @@ -4,6 +4,7 @@ class HttpDownloaderTest < Test::Unit::TestCase setup do @downloader, @tempfile = mock_downloader(Vagrant::Downloaders::HTTP) @downloader.stubs(:report_progress) + @downloader.stubs(:complete_progress) @uri = "foo.box" end