-
-
Notifications
You must be signed in to change notification settings - Fork 208
Closed
Description
Currently, yarn berry could be downloaded as two form, tar or js, depending on whether COREPACK_NPM_REGISTRY
is set. However, the hash validation step simply calculates the shasum of download stream, and obviously the hashes mismatch.
For example, shasums for yarn 4.1.1 are:
61b9f63c5edc625867eeda36190a4efebdf7840052db5f6583e301a9d228eb43 cli-dist-4.1.1.tgz
f3cc0eda8e5560e529c7147565b30faa43b4e472d90e8634d7134a37c7f59781 yarn.js
Reproduce steps:
- Call
corepack use [email protected]
withoutCOREPACK_NPM_REGISTRY
being set. Hash will be written topackage.json
"packageManager": "[email protected]+sha256.f3cc0eda8e5560e529c7147565b30faa43b4e472d90e8634d7134a37c7f59781"
- Copy the project to an environment where
COREPACK_NPM_REGISTRY
is set. - Call
corepack yarn
, following error will be thrown:
Internal Error: Mismatch hashes. Expected f3cc0eda8e5560e529c7147565b30faa43b4e472d90e8634d7134a37c7f59781, got 61b9f63c5edc625867eeda36190a4efebdf7840052db5f6583e301a9d228eb43
Metadata
Metadata
Assignees
Labels
No labels