Issues with `env.LOCKFILE` when `package-manager` input is explicitly specified but there is no package manager cache
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 259
- Forks
- 56
- Avg merge
- 9d 11h
- Merged PRs (30d)
- 2
Description
When package-manager is explicitly set (e.g. package-manager: yarn), the "Check lockfiles" step in action.yml sets PACKAGE_MANAGER but never sets LOCKFILE. The auto-detection branches all set both; the explicit branch sets only one.
This causes cache-dependency-path in the "Setup Node" step to evaluate to "./" (a bare directory), which actions/setup-node
glob expands recursively to every file in the workspace, spawning a potentially large number of concurrent NodeJS processes, which in turn corrupts V8's startup snapshot cache and produces fatal crashes. See https://github.com/actions/setup-node/issues/887
Steps to reproduce
- Use a repo where the lockfile is not committed (e.g.
yarn.lockis in.gitignore) - Set
package-manager: yarnexplicitly in the workflow - Run the action — the Setup Node step crashes
Expected behaviour
The cache-dependency-path should resolve to the lockfile path (e.g. ./yarn.lock),
identical to the existing auto-detection path.
If the lockfile is absent, caching should be skipped gracefully with a warning, rather than crashing.
Note well
This issue has been prepared with the help of Claude Code and ChatGPT Codex. I'm working on a fix with them and hope to land a PR soon, after some more testing.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in action.yml at the "Check lockfiles" and "Setup Node" steps, then reproduce with an explicitly specified package manager and no committed lockfile. Verify that cache-dependency-path resolves to the intended lockfile path when present and that caching is skipped with a warning when it is absent, without causing the Setup Node step to crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, nodejs
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100