feat: handling the case where "node" is used for tool-versions file. (#812)

This commit is contained in:
Vytis Valentinavičius authored and GitHub committed 2023-07-18 13:01:34 +02:00
1 parent c7a93deeac
commit ca2d4e0cdd
5 files changed
+6 -4

No files matched your search

+1 -1
View File
@@ -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;
}