mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-23 23:29:17 -05:00
refactor: self-update
This commit is contained in:
6
.changeset/cold-buckets-crash.md
Normal file
6
.changeset/cold-buckets-crash.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/tools.plugin-commands-self-updater": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
`pnpm self-update` should download pnpm from the configure npm registry [#10205](https://github.com/pnpm/pnpm/pull/10205).
|
||||
@@ -57,9 +57,8 @@ export async function installPnpmToTools (pnpmVersion: string, opts: SelfUpdateC
|
||||
// This is important when the user has configured a custom registry (e.g., a mirror)
|
||||
// in their .npmrc file, as the temporary directory is outside the project and won't
|
||||
// automatically pick up the project's .npmrc configuration.
|
||||
const registry = opts.registries?.default || opts.rawConfig?.registry
|
||||
if (registry) {
|
||||
command.push(`--config.registry=${registry}`)
|
||||
if (opts.registries?.default) {
|
||||
command.push(`--config.registry=${opts.registries.default}`)
|
||||
}
|
||||
runPnpmCli(command, { cwd: stage })
|
||||
// We need the operation of installing pnpm to be atomic.
|
||||
|
||||
Reference in New Issue
Block a user