mirror of
https://github.com/actions/setup-node.git
synced 2026-02-19 04:55:51 +08:00
Merge remote-tracking branch 'upstream/main' into feature/corepack
This commit is contained in:
12
src/main.ts
12
src/main.ts
@@ -112,7 +112,17 @@ function resolveVersionInput(): string {
|
||||
);
|
||||
}
|
||||
|
||||
version = parseNodeVersionFile(fs.readFileSync(versionFilePath, 'utf8'));
|
||||
const parsedVersion = parseNodeVersionFile(
|
||||
fs.readFileSync(versionFilePath, 'utf8')
|
||||
);
|
||||
|
||||
if (parsedVersion) {
|
||||
version = parsedVersion;
|
||||
} else {
|
||||
core.warning(
|
||||
`Could not determine node version from ${versionFilePath}. Falling back`
|
||||
);
|
||||
}
|
||||
|
||||
core.info(`Resolved ${versionFileInput} as ${version}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user