mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-25 15:07:06 -04:00
* fix(run): fail when no packages have script in filtered recursive run Previously, `pnpm run -r <script>` and `pnpm run --filter <filter> <script>` would silently succeed with exit code 0 when no packages had the specified script, as long as a filter was used. This was inconsistent with the documentation which states "If none of the packages have the command, the command fails." This change makes the command fail with ERR_PNPM_RECURSIVE_RUN_NO_SCRIPT in all cases where no packages have the script, regardless of whether a filter is used. The `--if-present` flag can be used to suppress this error. close #6844
341 B
341 B
pnpm, @pnpm/plugin-commands-script-runners
| pnpm | @pnpm/plugin-commands-script-runners |
|---|---|
| patch | patch |
pnpm run -r and pnpm run --filter now fail with a non-zero exit code when no packages have the specified script. Previously, this only failed when all packages were selected. Use --if-present to suppress this error #6844.