Skip to content

Commit

Permalink
Merge pull request #50 from actions/goenv
Browse files Browse the repository at this point in the history
go env block
  • Loading branch information
bryanmacfarlane committed Apr 6, 2020
2 parents 202a594 + 6613fc8 commit 78bd24e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,10 @@ function run() {
let goPath = yield io.which('go');
let goVersion = (child_process_1.default.execSync(`${goPath} version`) || '').toString();
console.log(goVersion);
core.startGroup('go env');
let goEnv = (child_process_1.default.execSync(`${goPath} env`) || '').toString();
console.log(goEnv);
core.endGroup();
}
catch (error) {
core.setFailed(error.message);
Expand Down
6 changes: 5 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ export async function run() {
// output the version actually being used
let goPath = await io.which('go');
let goVersion = (cp.execSync(`${goPath} version`) || '').toString();

console.log(goVersion);

core.startGroup('go env');
let goEnv = (cp.execSync(`${goPath} env`) || '').toString();
console.log(goEnv);
core.endGroup();
} catch (error) {
core.setFailed(error.message);
}
Expand Down

0 comments on commit 78bd24e

Please sign in to comment.