From ebfdf6ac95bce0e7e743a60aba7adf59b400885b Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Tue, 14 Mar 2023 16:07:41 +0100 Subject: [PATCH] add warning if go-version is empty (#350) --- dist/setup/index.js | 3 +++ src/main.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/dist/setup/index.js b/dist/setup/index.js index 62b8f21..f04942e 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -63609,6 +63609,9 @@ function run() { core.debug(`add bin ${added}`); core.info(`Successfully set up Go version ${versionSpec}`); } + else { + core.info('[warning]go-version input was not specified. The action will try to use pre-installed version.'); + } const goPath = yield io.which('go'); const goVersion = (child_process_1.default.execSync(`${goPath} version`) || '').toString(); if (cache && cache_utils_1.isCacheFeatureAvailable()) { diff --git a/src/main.ts b/src/main.ts index f32cdd6..d145818 100644 --- a/src/main.ts +++ b/src/main.ts @@ -54,6 +54,10 @@ export async function run() { const added = await addBinToPath(); core.debug(`add bin ${added}`); core.info(`Successfully set up Go version ${versionSpec}`); + } else { + core.info( + '[warning]go-version input was not specified. The action will try to use pre-installed version.' + ); } const goPath = await io.which('go');