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 Go bin if go-version input is empty #351

Merged
merged 4 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63596,10 +63596,10 @@ function run() {
core.info('Setting GOROOT for Go version < 1.9');
core.exportVariable('GOROOT', installDir);
}
const added = yield addBinToPath();
core.debug(`add bin ${added}`);
core.info(`Successfully set up Go version ${versionSpec}`);
}
const added = yield addBinToPath();
core.debug(`add bin ${added}`);
core.info(`Successfully set up Go version ${versionSpec}`);
const goPath = yield io.which('go');
const goVersion = (child_process_1.default.execSync(`${goPath} version`) || '').toString();
if (cache && cache_utils_1.isCacheFeatureAvailable()) {
Expand Down
8 changes: 4 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ export async function run() {
core.info('Setting GOROOT for Go version < 1.9');
core.exportVariable('GOROOT', installDir);
}

const added = await addBinToPath();
core.debug(`add bin ${added}`);
core.info(`Successfully set up Go version ${versionSpec}`);
}

const added = await addBinToPath();
core.debug(`add bin ${added}`);
core.info(`Successfully set up Go version ${versionSpec}`);
dmitry-shibanov marked this conversation as resolved.
Show resolved Hide resolved

const goPath = await io.which('go');
const goVersion = (cp.execSync(`${goPath} version`) || '').toString();

Expand Down