Skip to content

Commit ad70bef

Browse files
author
Vladimir Safonkin
committed
Fix condition for old go versions
1 parent 4a4352b commit ad70bef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2122,7 +2122,7 @@ function addBinToPath() {
21222122
return added;
21232123
}
21242124
let buf = child_process_1.default.execSync('go env GOPATH');
2125-
if (buf) {
2125+
if (buf.length > 1) {
21262126
let gp = buf.toString().trim();
21272127
core.debug(`go env GOPATH :${gp}:`);
21282128
if (!fs_1.default.existsSync(gp)) {

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export async function addBinToPath(): Promise<boolean> {
6969
}
7070

7171
let buf = cp.execSync('go env GOPATH');
72-
if (buf) {
72+
if (buf.length > 1) {
7373
let gp = buf.toString().trim();
7474
core.debug(`go env GOPATH :${gp}:`);
7575
if (!fs.existsSync(gp)) {

0 commit comments

Comments
 (0)