Skip to content

Windows: pnpm self-update from the bootstrap leaves a pnpm.cmd shim that is not recognized (pnpm 11 to 12) #291

Open

Description

@prisis

Summary

On windows-latest, with pnpm/action-setup@v6.1.0 and a packageManager of pnpm@12.11.2, every PowerShell step that calls pnpm after setup fails. The shim pnpm resolves to points at a path that does not run:

'"C:\Users\runneradmin\setup-pnpm\node_modules\.bin\bin\\..\global\v11\<id>\node_modules\pnpm\pnpm"' is not recognized as an internal or external command,

Bash steps on the same runner still work, because they resolve pnpm to the extensionless script rather than the .cmd shim.

What I see in the logs

The action bootstraps pnpm 11 (src/install-pnpm/run.ts) and then runs pnpm self-update <version> to the version in packageManager. The log line is Switching pnpm from v11.7.0 to v12.11.2. On Windows the .cmd shim left by that self-update points at the v11 global layout (global\v11) with the path quoted and the bin\ segment doubled, and the shim does not start.

The same workflow passes on Linux and macOS, and passes on Windows when packageManager is pnpm@11.x (main), so the trigger seems to be the pnpm 11 to 12 self-update on Windows.

Evidence

Not verified

I have not reduced this to a minimal repro outside our repository, and I have not checked whether pnpm 12.12.x changes the shim. I don't know whether the fault is in the action's self-update step or in pnpm's shim writer.

Environment

  • pnpm/action-setup@v6.1.0 (pinned by anolilab/workflows/step/node at aa162a98)
  • windows-latest, Node 24
  • packageManager: pnpm@12.11.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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