Skip to content

Commit

Permalink
Fix condition for old go versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Safonkin committed Apr 17, 2022
1 parent 4a4352b commit ad70bef
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
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
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 ad70bef

Please sign in to comment.