Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan MacFarlane committed Mar 26, 2020
1 parent 75899f8 commit 3e014ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand All @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3e014ec

Please sign in to comment.