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 3d89e60 commit 93ddff5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1331,14 +1331,15 @@ function addBinToPath() {
return __awaiter(this, void 0, void 0, function* () {
let added = false;
let g = yield io.which('go');
core.debug(`which go :${g};`);
if (!g) {
core.debug('go not in the path');
return added;
}
let buf = cp.execSync('go env GOPATH');
if (buf) {
let gp = buf.toString().trim();
core.debug(`go env GOPATH: ${gp}`);
core.debug(`go env GOPATH :${gp}:`);
if (fs.existsSync(gp)) {
let bp = path.join(gp, 'bin');
if (!fs.existsSync(bp)) {
Expand All @@ -1348,6 +1349,9 @@ function addBinToPath() {
core.addPath(bp);
added = true;
}
else {
core.debug('go env GOPATH does not exist');
}
}
return added;
});
Expand Down
3 changes: 1 addition & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ async function addBinToPath(): Promise<boolean> {

core.addPath(bp);
added = true;
}
else {
} else {
core.debug('go env GOPATH does not exist');
}
}
Expand Down

0 comments on commit 93ddff5

Please sign in to comment.