vscode-extensions: use sri hashes in update script (#381560)

authored by

Pol Dellaiera and committed by
GitHub
01d49279 c14ffef6

+3 -3
+3 -3
pkgs/applications/editors/vscode/extensions/update_installed_exts.sh
··· 43 43 curl --silent --show-error --retry 3 --fail -X GET -o "$EXTTMP/$N.zip" "$URL" 44 44 # Unpack the file we need to stdout then pull out the version 45 45 VER=$(jq -r '.version' <(unzip -qc "$EXTTMP/$N.zip" "extension/package.json")) 46 - # Calculate the SHA 47 - SHA=$(nix-hash --flat --base32 --type sha256 "$EXTTMP/$N.zip") 46 + # Calculate the hash 47 + HASH=$(nix-hash --flat --sri --type sha256 "$EXTTMP/$N.zip") 48 48 49 49 # Clean up. 50 50 rm -Rf "$EXTTMP" ··· 55 55 name = "$2"; 56 56 publisher = "$1"; 57 57 version = "$VER"; 58 - sha256 = "$SHA"; 58 + hash = "$HASH"; 59 59 } 60 60 EOF 61 61 }