diff options
author | Thom May <thom@chef.io> | 2016-02-09 14:01:12 -0800 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-02-09 14:01:12 -0800 |
commit | b4b91836f0b2f0e09e089acab43e410cd73e48a4 (patch) | |
tree | c6aadeaef06102b0f92d7bde5c0656191cba6b21 /lib/chef/knife | |
parent | 7755b93c72ef33d5041b6a9c4b53bcf29814579d (diff) | |
download | chef-b4b91836f0b2f0e09e089acab43e410cd73e48a4.tar.gz |
Use a streaming request to download cookbook
fixes #4549
Diffstat (limited to 'lib/chef/knife')
-rw-r--r-- | lib/chef/knife/cookbook_site_download.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/chef/knife/cookbook_site_download.rb b/lib/chef/knife/cookbook_site_download.rb index 7e4eda015f..2bdeea9781 100644 --- a/lib/chef/knife/cookbook_site_download.rb +++ b/lib/chef/knife/cookbook_site_download.rb @@ -86,8 +86,7 @@ class Chef def download_cookbook ui.info "Downloading #{@name_args[0]} from Supermarket at version #{version} to #{download_location}" - noauth_rest.sign_on_redirect = false - tf = noauth_rest.get desired_cookbook_data["file"], true + tf = noauth_rest.streaming_request(desired_cookbook_data["file"]) ::FileUtils.cp tf.path, download_location ui.info "Cookbook saved: #{download_location}" |