You've already forked setup-node
mirror of
https://github.com/actions/setup-node.git
synced 2025-07-16 12:00:30 +07:00
feat: handling the case where "node" is used for tool-versions file. (#812)
This commit is contained in:

committed by
GitHub

parent
c7a93deeac
commit
ca2d4e0cdd
@ -13,7 +13,7 @@ export function parseNodeVersionFile(contents: string): string {
|
||||
}
|
||||
|
||||
if (!nodeVersion) {
|
||||
const found = contents.match(/^(?:nodejs\s+)?v?(?<version>[^\s]+)$/m);
|
||||
const found = contents.match(/^(?:node(js)?\s+)?v?(?<version>[^\s]+)$/m);
|
||||
nodeVersion = found?.groups?.version;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user