Skip to content

Commit

Permalink
Merge pull request #221 from vsafonkin/v-vsafonkin/fix-gopath-condition
Browse files Browse the repository at this point in the history
Fix condition for GOPATH output
  • Loading branch information
Vladimir Safonkin authored Apr 19, 2022
2 parents 0794822 + ad70bef commit 46eabca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,7 @@ function addBinToPath() {
return added;
}
let buf = child_process_1.default.execSync('go env GOPATH');
if (buf) {
if (buf.length > 1) {
let gp = buf.toString().trim();
core.debug(`go env GOPATH :${gp}:`);
if (!fs_1.default.existsSync(gp)) {
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export async function addBinToPath(): Promise<boolean> {
}

let buf = cp.execSync('go env GOPATH');
if (buf) {
if (buf.length > 1) {
let gp = buf.toString().trim();
core.debug(`go env GOPATH :${gp}:`);
if (!fs.existsSync(gp)) {
Expand Down

0 comments on commit 46eabca

Please sign in to comment.