Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add step warning if go-version input is empty #350

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions dist/setup/index.js
Expand Up @@ -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()) {
Expand Down
4 changes: 4 additions & 0 deletions src/main.ts
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