From dbd75322e7d3522ac27c4749b8e3f7552201ef6e Mon Sep 17 00:00:00 2001 From: Richard Nixon Date: Sun, 26 Jul 2020 15:25:36 +0100 Subject: [PATCH] Possible Fix for 303 Enable tems out with chef_package_url param I can't test this as I dont have the means to publish Azure Extensions but with testing at the command line I believe this code may drastically improve Chef Client download times when using the chef_package_url param. It basically turns off the progress bar (which shouldn't even be a thing in headless scripts). Signed-off-by: Richard Nixon --- ChefExtensionHandler/bin/chef-install.psm1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChefExtensionHandler/bin/chef-install.psm1 b/ChefExtensionHandler/bin/chef-install.psm1 index 165380f2..76694691 100644 --- a/ChefExtensionHandler/bin/chef-install.psm1 +++ b/ChefExtensionHandler/bin/chef-install.psm1 @@ -50,6 +50,9 @@ function Install-ChefClient { $retrycount = 0 $completed = $false + # Disable progress bar for massive speedup on Invoke-WebRequest (particularly with Azure Blob Stores) + $ProgressPreference = 'SilentlyContinue' + while (-not $completed) { echo "Checking Chef Client ..." Try {