Skip to content

packageManager not respected when package.json is in a directory #1398

@daveisfera

Description

@daveisfera

Description:
packageManager is respected when package.json is at the root level, but not when it's in a directory

Action version:
Tested in 5.0 and 4.4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
Node 22 and 24 and yarn 4.10.3

Repro steps:
Specify node-version-file in a directory, like this

Expected behavior:
yarn version in packageManager would be used even when package.json is in a directory

Actual behavior:
Classic version of yarn is incorrectly used

See example here:
https://github.com/daveisfera/test_setup-node_packageManager/actions/runs/18364960502/job/52316018966

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions