ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
21.24k stars 1.41k forks source link

Can't install a previous version of Visual Studio Code #4345

Closed kamiyubidan closed 2 years ago

kamiyubidan commented 3 years ago

Scoop can't install a previous version of Visual Studio Code. I tried changing the version number and hash in the manifest manually but it still did not install.

Thanks.

PS C:\Users\nurey> scoop install vscode-portable-js@1.54.3
WARN  Given version (1.54.3) does not match manifest (1.55.2)
WARN  Attempting to generate manifest for 'vscode-portable-js' (1.54.3)
Autoupdating vscode-portable-js
Searching hash for dl.7z in https://code.visualstudio.com/sha?build=stable
Found: 7fa464f315de5927fbf165e69709ffe837d535c28a015145007cf545d17378d9 using Json Mode
Searching hash for dl.7z in https://code.visualstudio.com/sha?build=stable
Found: 7a112a19d98c4645cf806f857f340c2ad0fd7f45122e1325c97c7c3be2abfdd0 using Json Mode
Writing updated vscode-portable-js manifest
Installing 'vscode-portable-js' (1.54.3) [64bit]
dl.7z (95,6 MB) [===========================================================================================] 100%
Checking hash of dl.7z ... ERROR Hash check failed!
App:         vscode-portable-js
URL:         https://update.code.visualstudio.com/1.54.3/win32-x64-archive/stable#/dl.7z
First bytes: 50 4B 03 04 14 00 00 00
Expected:    7a112a19d98c4645cf806f857f340c2ad0fd7f45122e1325c97c7c3be2abfdd0
Actual:      16525625bd1f5549b0b624a245fcba18c3944e55a19c615cd20df1d8545a04ce

Please try again or create a new issue by using the following link and paste your console output:
https:////
rofrol commented 3 years ago
$ scoop uninstall vscode
$ cd ~/scoop/buckets/extras/bucket
# Go back before vscode was upgrade to 1.60.0
$ git checkout de8f507374cfc1cc40f87ebd89a17f053077942d^ -- vscode.json
$ scoop install vscode
# Prevent upgrading
$ scoop hold vscode
# Restore git repo to latest version
$ git checkout -f

There is idea to automate this restoring https://github.com/lukesampson/scoop/issues/3894

rofrol commented 2 years ago

Closed?

rashil2000 commented 2 years ago

Handling for VSCode manifests was changed recently (converted from non-portable to portable). So it is not advisable to generate an older manifest from the current one.

As you mentioned, generating old manifest from git history is a better idea, which is tracked in #3894.