diff --git a/dist/index.js b/dist/index.js index 15bb57e42..67ec000e6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2530,7 +2530,7 @@ function run() { const installDir = yield installer.getGo(versionSpec, stable, auth); console.log(`installDir is ${installDir}`); core.exportVariable('GOROOT', installDir); - const content = fs_1.default.readdirSync(installDir); + const content = fs_1.default.readdirSync(path_1.default.join(installDir, "go")); console.log(content); core.addPath(path_1.default.join(installDir, 'bin')); console.log('Added go to the path'); diff --git a/src/main.ts b/src/main.ts index 0d78d041b..c3d4db305 100644 --- a/src/main.ts +++ b/src/main.ts @@ -31,7 +31,7 @@ export async function run() { console.log(`installDir is ${installDir}`) core.exportVariable('GOROOT', installDir); - const content = fs.readdirSync(installDir); + const content = fs.readdirSync(path.join(installDir, "go")); console.log(content); core.addPath(path.join(installDir, 'bin')); console.log('Added go to the path');