Skip to content

Commit ebfdf6a

Browse files
add warning if go-version is empty (#350)
1 parent b27d769 commit ebfdf6a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Diff for: dist/setup/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -63609,6 +63609,9 @@ function run() {
6360963609
core.debug(`add bin ${added}`);
6361063610
core.info(`Successfully set up Go version ${versionSpec}`);
6361163611
}
63612+
else {
63613+
core.info('[warning]go-version input was not specified. The action will try to use pre-installed version.');
63614+
}
6361263615
const goPath = yield io.which('go');
6361363616
const goVersion = (child_process_1.default.execSync(`${goPath} version`) || '').toString();
6361463617
if (cache && cache_utils_1.isCacheFeatureAvailable()) {

Diff for: src/main.ts

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ export async function run() {
5454
const added = await addBinToPath();
5555
core.debug(`add bin ${added}`);
5656
core.info(`Successfully set up Go version ${versionSpec}`);
57+
} else {
58+
core.info(
59+
'[warning]go-version input was not specified. The action will try to use pre-installed version.'
60+
);
5761
}
5862

5963
const goPath = await io.which('go');

0 commit comments

Comments
 (0)