Add Go bin if go-version input is empty (#351)

This commit is contained in:
Dmitry Shibanov
2023-03-14 16:29:10 +01:00
committed by GitHub
parent ebfdf6ac95
commit fdc0d672a1
2 changed files with 5 additions and 4 deletions

View File

@ -51,8 +51,6 @@ export async function run() {
core.exportVariable('GOROOT', installDir);
}
const added = await addBinToPath();
core.debug(`add bin ${added}`);
core.info(`Successfully set up Go version ${versionSpec}`);
} else {
core.info(
@ -60,6 +58,9 @@ export async function run() {
);
}
const added = await addBinToPath();
core.debug(`add bin ${added}`);
const goPath = await io.which('go');
const goVersion = (cp.execSync(`${goPath} version`) || '').toString();