From 5d9c002bdd13cf6a10e09d632c0a571385d20cc2 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 23 Nov 2013 15:47:42 -0800 Subject: [PATCH] core: don't make all downloads continuable --- lib/vagrant/action/builtin/box_add.rb | 1 + lib/vagrant/util/downloader.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/action/builtin/box_add.rb b/lib/vagrant/action/builtin/box_add.rb index 5e29c3f4a..82ee0da75 100644 --- a/lib/vagrant/action/builtin/box_add.rb +++ b/lib/vagrant/action/builtin/box_add.rb @@ -29,6 +29,7 @@ module Vagrant end downloader_options = {} + downloader_options[:continue] = true downloader_options[:insecure] = env[:box_download_insecure] downloader_options[:ui] = env[:ui] diff --git a/lib/vagrant/util/downloader.rb b/lib/vagrant/util/downloader.rb index 360b0d9bf..caf541cf9 100644 --- a/lib/vagrant/util/downloader.rb +++ b/lib/vagrant/util/downloader.rb @@ -20,6 +20,7 @@ module Vagrant # Get the various optional values options ||= {} + @continue = options[:continue] @insecure = options[:insecure] @ui = options[:ui] end @@ -38,9 +39,9 @@ module Vagrant "--max-redirs", "10", "--user-agent", USER_AGENT, "--output", @destination, - "--continue-at", "-" ] + options += ["--continue-at", "-"] if @continue options << "--insecure" if @insecure options << @source