Files
pnpm/cli
Zoltan Kochan bcd337fa72 fix(cli): honor --pm-on-fail when combined with --help / --version (#11489)
The CLI argument parser short-circuits `--help` and `--version` and was discarding every other parsed option in the process — including universal flags like `--pm-on-fail`. So `pnpm audit --pm-on-fail=ignore --help` and `pnpm --pm-on-fail=ignore --version` failed with the strict `packageManager` mismatch error instead of doing what was asked. Users had no documented way out: the suggested escape hatch in the error message itself didn't work.

The fix plucks universal options back out of the exploratory `nopt` parse and surfaces them through both short-circuits. They were already typed correctly there; only the regular per-command parse adds command-specific options. Command-specific options (e.g. `--frozen-lockfile`) stay dropped, since the matching command isn't being executed.

Closes [#11487](https://github.com/pnpm/pnpm/issues/11487).
2026-05-06 14:28:06 +02:00
..
2026-04-30 23:03:46 +02:00
2026-05-05 19:50:32 +02:00
2026-05-05 19:50:32 +02:00
2026-04-30 23:03:46 +02:00
2026-04-30 23:03:46 +02:00