Skip to content

Commit

Permalink
more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan MacFarlane committed Mar 26, 2020
1 parent 1fea44b commit 3d89e60
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export async function run() {
async function addBinToPath(): Promise<boolean> {
let added = false;
let g = await io.which('go');
core.debug(`which go :${g};`);
if (!g) {
core.debug('go not in the path');
return added;
Expand All @@ -71,7 +72,7 @@ async function addBinToPath(): Promise<boolean> {
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 @@ -82,6 +83,9 @@ async function addBinToPath(): Promise<boolean> {
core.addPath(bp);
added = true;
}
else {
core.debug('go env GOPATH does not exist');
}
}
return added;
}

0 comments on commit 3d89e60

Please sign in to comment.