Skip to content

Fallback to default node version if .nvmrc file does not exist #613

@Th3S4mur41

Description

@Th3S4mur41

Description:
Currently using a node version file results in an error if the configured file is not found.

e.g. using .nvmrc

- uses: actions/setup-node@v3
  with:
    node-version-file: '.nvmrc'

Fails with the following error

The specified node version file at: /__w/actions/actions/.nvmrc does not exist

Justification:
When reusing workflows in multiple repositories, it will happen that some of them don't require a specific node version and therefor have no .nvmrc file.

In such cases, instead of failing it would be better to throw a warning and fallback to the default node version

Are you willing to submit a PR?
Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request to improve the current logic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions