mirror of
https://github.com/actions/setup-node.git
synced 2025-04-23 01:36:27 +00:00
checks implemented for node version file
This commit is contained in:
parent
34ece939a3
commit
6382f41129
1 changed files with 11 additions and 0 deletions
11
src/main.ts
11
src/main.ts
|
@ -74,6 +74,17 @@ function isGhes(): boolean {
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolveVersionInput(): string {
|
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');
|
let version = core.getInput('node-version') || core.getInput('version');
|
||||||
if (version) {
|
if (version) {
|
||||||
return version;
|
return version;
|
||||||
|
|
Loading…
Add table
Reference in a new issue