mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-23 23:29:17 -05:00
fix: correct corepack self-update instructions (#9101)
* fix: correct corepack self-update instructions The previous instructions did not actually update the pnpm version used by corepack in the local project. See https://github.com/nodejs/corepack/issues/587
This commit is contained in:
6
.changeset/gold-cameras-talk.md
Normal file
6
.changeset/gold-cameras-talk.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/default-reporter": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Fix instruction for updating pnpm with corepack [#9101](https://github.com/pnpm/pnpm/pull/9101).
|
||||
@@ -50,7 +50,7 @@ function renderUpdateMessage (opts: UpdateMessageOptions): string {
|
||||
|
||||
function renderUpdateCommand (opts: UpdateMessageOptions): string {
|
||||
if (isExecutedByCorepack(opts.env)) {
|
||||
return `corepack install -g pnpm@${opts.latestVersion}`
|
||||
return `corepack use pnpm@${opts.latestVersion}`
|
||||
}
|
||||
if (opts.env.PNPM_HOME) {
|
||||
return 'pnpm self-update'
|
||||
|
||||
@@ -6,7 +6,7 @@ exports[`print update notification for Corepack if the latest version is greater
|
||||
│ │
|
||||
│ Update available! 10.0.0 → 11.0.0. │
|
||||
│ Changelog: https://github.com/pnpm/pnpm/releases/tag/v11.0.0 │
|
||||
│ Run "corepack install -g pnpm@11.0.0" to update. │
|
||||
│ Run "corepack use pnpm@11.0.0" to update. │
|
||||
│ │
|
||||
╰──────────────────────────────────────────────────────────────────╯
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user