Merge remote-tracking branch 'refs/remotes/origin/pull209' into pull209

This commit is contained in:
Hargun Kaur 2021-11-22 18:29:21 +00:00 committed by GitHub
commit e75d7c128f
7 changed files with 72 additions and 24 deletions

View file

@ -78,7 +78,9 @@ function resolveVersionInput(): string {
const versionFileInput = core.getInput('node-version-file');
if (version && versionFileInput) {
core.warning('Both node-version and node-version-file are specified');
core.warning(
'Both node-version and node-version-file inputs are specified, only node-version will be used'
);
}
if (version) {
@ -91,7 +93,9 @@ function resolveVersionInput(): string {
versionFileInput
);
if (!fs.existsSync(versionFilePath)) {
throw new Error('No specified file exists');
throw new Error(
`The specified node version file at: ${versionFilePath} does not exist`
);
}
version = installer.parseNodeVersionFile(
fs.readFileSync(versionFilePath, 'utf8')