checks implemented for node version file

This commit is contained in:
Hargun Kaur 2021-11-02 13:34:36 +00:00 committed by GitHub
parent 34ece939a3
commit 6382f41129

View file

@ -74,6 +74,17 @@ function isGhes(): boolean {
}
function resolveVersionInput(): string {
if(!(core.getInput('node-version') || core.getInput('version')))
{
core.error('No specified file exists')
}
if(core.getInput('node-version') && core.getInput('version'))
{
core.warning('Both version and node-version-file are specified')
}
let version = core.getInput('node-version') || core.getInput('version');
if (version) {
return version;