mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 05:14:44 +00:00
feat: handling the case where "node" is used for tool-versions file. (#812)
This commit is contained in:
parent
c7a93deeac
commit
ca2d4e0cdd
5 changed files with 6 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue