1
0
Fork 0
mirror of https://github.com/actions/setup-go synced 2024-12-22 06:12:42 +00:00

Merge pull request #50 from actions/goenv

go env block
This commit is contained in:
Bryan MacFarlane 2020-04-06 09:29:27 -04:00 committed by GitHub
commit 78bd24e01a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

4
dist/index.js vendored
View file

@ -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);

View file

@ -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);
} }