Skip to content

Action fails with devEngines.packageManager.onFail="error" when version input is omitted #252

@muhi111

Description

@muhi111

Description:
Hi there, thank you for maintaining this action.

I encountered an issue where the setup fails when strict versioning is enforced via devEngines. It seems that when the version input is omitted, the action relies on pnpm's manage-package-manager-versions feature to resolve the version. However, because onFail is set to "error", this auto-update mechanism doesn't work, and the process immediately exits with an error.

I just wanted to report this phenomenon and ask if this is the intended specification for v6.

Minimal Reproducible Example:

.github/workflows/test.yml

on:
  push:
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v6
      - run: pnpm --version

package.json

{
  "devEngines": {
    "packageManager": {
      "name": "pnpm",
      "version": "11.0.9",
      "onFail": "error"
    }
  }
}

Actual Output:

Run pnpm --version
 ERROR  This project is configured to use 11.0.9 of pnpm. Your current pnpm is v11.0.4
If you want to bypass this version check, you can set the "pmOnFail" configuration to "warn" or "ignore" (e.g. via --pm-on-fail=ignore). If using "devEngines.packageManager", you can set its "onFail" to "warn" or "ignore"
Error: Process completed with exit code 1.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions