From 3730c7e72937f671202bdc63388832d6d1b86bde Mon Sep 17 00:00:00 2001 From: Manuel Mendez Date: Tue, 14 Dec 2021 13:24:18 -0500 Subject: [PATCH] Do not export GOROOT 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 --- __tests__/setup-go.test.ts | 2 +- src/main.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/__tests__/setup-go.test.ts b/__tests__/setup-go.test.ts index a08104979..1bf59df77 100644 --- a/__tests__/setup-go.test.ts +++ b/__tests__/setup-go.test.ts @@ -244,7 +244,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 () => { diff --git a/src/main.ts b/src/main.ts index f785b85da..7a9c1f51d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -23,7 +23,6 @@ export async function run() { const checkLatest = core.getBooleanInput('check-latest'); const installDir = await installer.getGo(versionSpec, checkLatest, auth); - core.exportVariable('GOROOT', installDir); core.addPath(path.join(installDir, 'bin')); core.info('Added go to the path');