Visitar URL original
`--force` help text claims it installs optional dependencies for other platforms · Issue #16435 · pnpm/pnpm · GitHub
Skip to content

--force help text claims it installs optional dependencies for other platforms #16435

Closed

Description

@zkochan

The --force help text of pnpm install and pnpm add (pnpm v12) says:

Reinstall every package the lockfile names: relink packages an earlier install already materialized, and install optional dependencies whose cpu / os / libc / engines don't match the host instead of skipping them

pnpm v12 does not do the second part, and it shouldn't: --force keeps skipping optional dependencies that don't match the host's platform. The help text needs to be changed to match that behavior, not the other way around.

The doc comment on the force setting in pnpm/crates/config/src/settings.rs already describes the current behavior: "Optional dependencies whose cpu / os / libc don't match the host stay skipped unless force_ignores_platform is set."

Where the text lives

  • pnpm/crates/cli/src/cli_args/install/arguments.rs (the force field of InstallMaterializationArgs)
  • pnpm/crates/cli/src/cli_args/add/arguments.rs (same wording)

How it showed up

The pnpm v10 release workflow used pnpm install --force to get every platform artifact of @reflink/reflink installed. That's what pnpm v10's --force did. With pnpm 12.7.0, --force installed none of them, and the help text suggested it would. The workflow now selects the platforms with --os / --cpu instead (#16330).

Anyone else relying on the v10 behavior needs to switch to --os / --cpu / --libc (or supportedArchitectures). The help text could say so.


Written by an agent (Claude Code, claude-opus-5-5).

Activity

  1. github-actions commented on Sep 30, 2026

    @github-actions
    Contributor

    @zkochan, are you planning to open a pull request for this? If so, reply here and a maintainer will assign the issue to you, so nobody else starts on the same fix.

  2. self-assigned this
    on Sep 30, 2026
  3. zkochan commented on Sep 30, 2026

    @zkochan
    MemberAuthor

    Opened #16442. It rewords the --force help text of pnpm install and pnpm add to say that optional dependencies for other platforms stay skipped unless forceIgnoresPlatform is set, and points to --os / --cpu / --libc for installing them. It covers the whole issue. The website docs already described the current behavior.


    Written by an agent (Claude Code, claude-opus-5-5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions