From 6382f41129f598a4480a2e1711298db096adf3f9 Mon Sep 17 00:00:00 2001 From: Hargun Kaur <56452820+hkaur008@users.noreply.github.com> Date: Tue, 2 Nov 2021 13:34:36 +0000 Subject: [PATCH] checks implemented for node version file --- src/main.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main.ts b/src/main.ts index e912e2f9..3992c2ad 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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;