Fix condition for old go versions
This commit is contained in:
parent
4a4352b330
commit
ad70bef2ef
|
@ -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)) {
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue