Skip to content

v6.0.9: false-positive "v10 installation layout" warning when self-updating from bootstrap 11.7.0 (still reproduces with pnpm 11.19.0) #281

Description

@hckhanh

Summary

pnpm/action-setup@v6.0.9 (0ebf471) still emits a false-positive v10 layout warning whenever it self-updates from the action's bootstrap pnpm (11.7.0) to the project's packageManager pin.

This is the same report as #278 (closed as completed on 2026-07-17 with no comments and no release after v6.0.9). Re-opening as a new issue because the warning is still present when targeting pnpm 11.19.0.

Running self-installer...
    added 1 package in 3s
    Checking for updates...
    Switching pnpm from v11.7.0 to v11.19.0...
    [WARN] Detected a pnpm v10 installation layout at PNPM_HOME. The pnpm shims at PNPM_HOME have been refreshed so the new version is active, but pnpm v11 expects bins in PNPM_HOME/bin. Run "pnpm setup" to migrate your PATH to the v11 layout.
    Successfully updated pnpm to v11.19.0

No real v10 install is involved. The warning is noise in CI; the install still succeeds and the correct version is active.

Reproduction

package.json:

{ "packageManager": "pnpm@11.19.0" }
jobs:
  repro:
    runs-on: ubuntu-latest # also seen on self-hosted linux/arm64
    steps:
      - uses: actions/checkout@v6
      - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
        # version omitted → reads package.json#packageManager
      - uses: actions/setup-node@v6
        with:
          node-version: 24

Why it fires

The warning string is emitted by pnpm itself during self-update:

https://github.com/pnpm/pnpm/blob/main/pnpm11/engine/pm/commands/src/self-updater/selfUpdate.ts

// pnpm v10 setup linked bins directly into pnpmHomeDir ...
if (hasLegacyHomeDirShim(opts.pnpmHomeDir)) {
  // refresh legacy shims...
  globalWarn(
    'Detected a pnpm v10 installation layout at PNPM_HOME. ...'
  )
}

hasLegacyHomeDirShim treats a pnpm file directly under PNPM_HOME as a v10 marker. In this action, PNPM_HOME is pointed at the bootstrap's node_modules/.bin (see src/install-pnpm/run.ts in v6.0.9), which always contains a pnpm shim from npm ci / the action's own link step. So every self-update from bootstrap 11.7.0 → any other version false-positives by construction.

Notes

Possible directions (from #278)

  1. Give the bootstrap a dedicated PNPM_HOME (e.g. <dest>/pnpm-home) separate from node_modules/.bin.
  2. Or teach pnpm's hasLegacyHomeDirShim to distinguish an npm-managed .bin from a real v10 setup layout.

Environment

  • pnpm/action-setup@v6.0.9 (0ebf47130e4866e96fce0953f49152a61190b271)
  • bootstrap pnpm 11.7.0 → target pnpm 11.19.0
  • Observed in GitHub Actions CI (linux/arm64 self-hosted runners and expected on ubuntu-latest)

Happy to help test a fix.

Metadata

Metadata

Assignees

No one assigned

    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