diff --git a/dist/index.js b/dist/index.js index 1de8d7b..fee1cca 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1308,7 +1308,7 @@ function run() { console.log('Added go to the path'); // if the global installed bin wasn't added, // we can add the bin just installed - if (!addBinToPath) { + if (!addedBin) { addBinToPath(); } } @@ -1331,8 +1331,10 @@ function addBinToPath() { let buf = cp.execSync('go env GOPATH'); if (buf) { let d = buf.toString().trim(); + core.debug(`go env GOPATH: ${d}`); let bp = path.join(d, 'bin'); if (fs.existsSync(bp)) { + core.debug(`${bp} exists`); core.addPath(bp); added = true; } diff --git a/src/main.ts b/src/main.ts index 4e6b53d..9431d05 100644 --- a/src/main.ts +++ b/src/main.ts @@ -67,7 +67,7 @@ function addBinToPath(): boolean { let d = buf.toString().trim(); core.debug(`go env GOPATH: ${d}`); let bp = path.join(d, 'bin'); - + if (fs.existsSync(bp)) { core.debug(`${bp} exists`); core.addPath(bp);