mirror of
https://codeberg.org/actions/setup-go.git
synced 2024-01-07 17:16:05 +00:00
go env block
This commit is contained in:
parent
202a594963
commit
6613fc89fc
4
dist/index.js
vendored
4
dist/index.js
vendored
|
@ -1322,6 +1322,10 @@ function run() {
|
||||||
let goPath = yield io.which('go');
|
let goPath = yield io.which('go');
|
||||||
let goVersion = (child_process_1.default.execSync(`${goPath} version`) || '').toString();
|
let goVersion = (child_process_1.default.execSync(`${goPath} version`) || '').toString();
|
||||||
console.log(goVersion);
|
console.log(goVersion);
|
||||||
|
core.startGroup('go env');
|
||||||
|
let goEnv = (child_process_1.default.execSync(`${goPath} env`) || '').toString();
|
||||||
|
console.log(goEnv);
|
||||||
|
core.endGroup();
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
|
|
|
@ -54,8 +54,12 @@ export async function run() {
|
||||||
// output the version actually being used
|
// output the version actually being used
|
||||||
let goPath = await io.which('go');
|
let goPath = await io.which('go');
|
||||||
let goVersion = (cp.execSync(`${goPath} version`) || '').toString();
|
let goVersion = (cp.execSync(`${goPath} version`) || '').toString();
|
||||||
|
|
||||||
console.log(goVersion);
|
console.log(goVersion);
|
||||||
|
|
||||||
|
core.startGroup('go env');
|
||||||
|
let goEnv = (cp.execSync(`${goPath} env`) || '').toString();
|
||||||
|
console.log(goEnv);
|
||||||
|
core.endGroup();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue