Skip to content

Commit

Permalink
Do not export GOROOT
Browse files Browse the repository at this point in the history
This has not been necessary since [Go 1.9](https://go.dev/doc/go1.9#goroot) at least (although clunky) but definitely not since [Go 1.10](https://go.dev/doc/go1.10#goroot).
This is cargo culting code that is more than 2 years out of date and runs into issues when multiple go versions are used in an action run.

Signed-off-by: Manuel Mendez <mmendez534@gmail.com>
  • Loading branch information
mmlb committed Dec 14, 2021
1 parent 9735516 commit 607cfc7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion __tests__/setup-go.test.ts
Expand Up @@ -243,7 +243,7 @@ describe('setup-go', () => {
});

await main.run();
expect(vars).toBe({'GOROOT': 'foo'});
expect(vars).toBe({});
});

it('finds a version of go already in the cache', async () => {
Expand Down
1 change: 0 additions & 1 deletion src/main.ts
Expand Up @@ -26,7 +26,6 @@ export async function run() {

const installDir = await installer.getGo(versionSpec, stable, auth);

core.exportVariable('GOROOT', installDir);
core.addPath(path.join(installDir, 'bin'));
core.info('Added go to the path');

Expand Down

0 comments on commit 607cfc7

Please sign in to comment.