`node-version-file` should support absolute paths
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5k
- Forks
- 1.7k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 2
Description
Description:
If we pass a absolute path to node-version-file, for example, when using with Composite Actions, the resulting path is resolved incorrectly, due to a path.join() call.
Action version:
v3
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
Repro steps:
- In a composite action with
.nvmrc, use following as input:node-version-file: ${{ github.action_path }}/.nvmrc
Example broken action run: https://github.com/sidvishnoi/mediasession/actions/runs/6158104300/job/16710218833?pr=1
Expected behavior:
If it can check whether provided node-version-file exists as is, or perhaps use path.resolve(), it won't break with absolute paths.
Actual behavior:
Error: The specified node version file at: /home/runner/work/mediasession/mediasession/home/runner/work/_actions/w3c/spec-prod/fix-nvmrc/.nvmrc does not exist
^^^
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 src/main.ts around lines 96-100, where node-version-file is resolved, and reproduce the composite-action example using an absolute .nvmrc path. Verify that absolute paths are checked without being prefixed again, while relative paths continue to work and the reported missing-file error is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100