From c7f2c70396d2dc5d3176b548ab5bb4127d0e594c Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Wed, 8 Mar 2023 13:31:51 +0100 Subject: [PATCH] add warning if go-version is empty --- 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 b1fe2cad7..4eecaf91c 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -63600,6 +63600,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 82fc54007..0c7a30f33 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');