Skip to content

Commit

Permalink
add warning if go-version is empty (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-shibanov authored Mar 14, 2023
1 parent b27d769 commit ebfdf6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit ebfdf6a

Please sign in to comment.