From fb7eab6ac8e506e488d016b258a6cd212fa3aae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 15 Feb 2022 14:48:30 +0100 Subject: [PATCH] vscode-extensions: retry if the marketplace API closes the connection unexpected --- pkgs/misc/vscode-extensions/update_installed_exts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/misc/vscode-extensions/update_installed_exts.sh b/pkgs/misc/vscode-extensions/update_installed_exts.sh index 5af747605f59..44cf506b3ab8 100755 --- a/pkgs/misc/vscode-extensions/update_installed_exts.sh +++ b/pkgs/misc/vscode-extensions/update_installed_exts.sh @@ -40,7 +40,7 @@ function get_vsixpkg() { URL="https://$1.gallery.vsassets.io/_apis/public/gallery/publisher/$1/extension/$2/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage" # Quietly but delicately curl down the file, blowing up at the first sign of trouble. - curl --silent --show-error --fail -X GET -o "$EXTTMP/$N.zip" "$URL" + curl --silent --show-error --retry 3 --fail -X GET -o "$EXTTMP/$N.zip" "$URL" # Unpack the file we need to stdout then pull out the version VER=$(jq -r '.version' <(unzip -qc "$EXTTMP/$N.zip" "extension/package.json")) # Calculate the SHA