mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-23 23:29:17 -05:00
fix(publish): respect --force flag in recursive publish (#10277)
When using 'pnpm -r publish --force', the --force flag was being ignored. The flag was checked to determine which packages to publish, but wasn't passed to individual publish commands. This adds --force to the appendedArgs array so it gets passed through to each publish call, following the same pattern as other CLI flags like --access, --dry-run, and --otp. close #10272
This commit is contained in:
6
.changeset/empty-paws-march.md
Normal file
6
.changeset/empty-paws-march.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-publishing": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
`pnpm publish -r --force` should allow to run publish over already existing versions in the registry [#10272](https://github.com/pnpm/pnpm/issues/10272).
|
||||
@@ -99,6 +99,9 @@ export async function recursivePublish (
|
||||
if (opts.dryRun) {
|
||||
appendedArgs.push('--dry-run')
|
||||
}
|
||||
if (opts.force) {
|
||||
appendedArgs.push('--force')
|
||||
}
|
||||
if (opts.cliOptions['otp']) {
|
||||
appendedArgs.push(`--otp=${opts.cliOptions['otp'] as string}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user