Corepack install -g doesn't update known good releases
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.8k
- Forks
- 279
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
The documentation states that the known good releases of system wide binaries can be updated using corepack install -g:
Known Good Releases
When running Corepack within projects that don't list a supported package manager, it will default to a set of Known Good Releases.
If there is no Known Good Release for the requested package manager, Corepack looks up the npm registry for the latest available version and cache it for future use.
The Known Good Releases can be updated system-wide using corepack install -g. When Corepack downloads a new version of a given package manager on the same major line as the Known Good Release, it auto-updates it by default.
and
Package managers thus installed will be configured as the new default when calling their respective binaries outside of projects defining the packageManager field.
Yet when I tell corepack to install yarn@1.22.22 globally, and try to invoke yarn --version it tells me that yarn is using yarn@1.22.19. I have cleaned my cache and attempted to install yarn@1.22.22 globally and then attempt to invoke yarn before the default would get downloaded but I get a prompt telling me to use yarn@1.22.19.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with corepack install -g yarn@1.22.22, then run yarn --version after clearing the cache as described. Trace how the global install updates Known Good Releases and verify that invoking Yarn uses 1.22.22 rather than 1.22.19.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100