diff --git a/pkgs/applications/editors/vscode/extensions/update_installed_exts.sh b/pkgs/applications/editors/vscode/extensions/get_updates_installed_exts.sh old mode 100755 new mode 100644 similarity index 76% rename from pkgs/applications/editors/vscode/extensions/update_installed_exts.sh rename to pkgs/applications/editors/vscode/extensions/get_updates_installed_exts.sh index dd2e8ef247895..82a7eaa30b956 --- a/pkgs/applications/editors/vscode/extensions/update_installed_exts.sh +++ b/pkgs/applications/editors/vscode/extensions/get_updates_installed_exts.sh @@ -3,6 +3,9 @@ # shellcheck shell=bash set -eu -o pipefail +# pass to specify format as either json or nix (default nix) +# note that json format is NOT a json array, but a sequence of json objects + # can be added to your configuration with the following command and snippet: # $ ./pkgs/applications/editors/vscode/extensions/update_installed_exts.sh > extensions.nix # @@ -40,7 +43,15 @@ 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 --retry 3 --fail -X GET -o "$EXTTMP/$N.zip" "$URL" + curl --silent --show-error --retry 3 --fail -X GET -o "$EXTTMP/$N.zip" "$URL" || { + if (($? > 128)) + then exit $? + fi + cat >&2 <