mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-19 21:04:45 +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
2
dist/cache-save/index.js
vendored
2
dist/cache-save/index.js
vendored
|
@ -60754,7 +60754,7 @@ function parseNodeVersionFile(contents) {
|
|||
core.info('Node version file is not JSON file');
|
||||
}
|
||||
if (!nodeVersion) {
|
||||
const found = contents.match(/^(?:nodejs\s+)?v?(?<version>[^\s]+)$/m);
|
||||
const found = contents.match(/^(?:node(js)?\s+)?v?(?<version>[^\s]+)$/m);
|
||||
nodeVersion = (_c = found === null || found === void 0 ? void 0 : found.groups) === null || _c === void 0 ? void 0 : _c.version;
|
||||
}
|
||||
// In the case of an unknown format,
|
||||
|
|
2
dist/setup/index.js
vendored
2
dist/setup/index.js
vendored
|
@ -72336,7 +72336,7 @@ function parseNodeVersionFile(contents) {
|
|||
core.info('Node version file is not JSON file');
|
||||
}
|
||||
if (!nodeVersion) {
|
||||
const found = contents.match(/^(?:nodejs\s+)?v?(?<version>[^\s]+)$/m);
|
||||
const found = contents.match(/^(?:node(js)?\s+)?v?(?<version>[^\s]+)$/m);
|
||||
nodeVersion = (_c = found === null || found === void 0 ? void 0 : found.groups) === null || _c === void 0 ? void 0 : _c.version;
|
||||
}
|
||||
// In the case of an unknown format,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue