Merge pull request #221 from vsafonkin/v-vsafonkin/fix-gopath-condition

Fix condition for GOPATH output
This commit is contained in:
Vladimir Safonkin 2022-04-19 09:58:46 +03:00 committed by GitHub
commit 46eabca1ab
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored
View file

@ -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)) {

View file

@ -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)) {