You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Runtime version detection breaks when pnpm writes [WARN] to stdout #57
pnpm 12 writes a warning to stdout, ahead of the JSON, when the project configures pmOnFail:
[WARN] Using --global skips the package manager check for this project
so JSON.parse sees [WARN] Usin....
Repro (pnpm 12.4.1)
mkdir repro &&cd repro
printf'{"name":"t","version":"1.0.0"}'> package.json
printf'pmOnFail: warn\n'> pnpm-workspace.yaml # `error` does it too; removing the key does not
pnpm list --global --json --depth 0 | head -1
# [WARN] Using --global skips the package manager check for this project
Suggested fix
pnpm list --reporter=silent --global --json --depth 0 returns clean JSON in the same repro. Alternatively, slice from the first [ before parsing, so any future stdout noise is tolerated — the comment above the function already says this path must never break setup.
Activity
hyrious commentedon Oct 8, 2026
Just hit this case with
pnpm/setup@v3in my workflow: https://github.com/hyrious/dup/actions/runs/37735849640/job/113175052261#step:3:37My config:
The warning:
fix: read the runtime versions when pnpm prints more than the listing
fix: read the runtime versions when pnpm prints more than the listing (…