Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Commit c026b8c

Browse files
stamblerreramya-rao-a
authored andcommitted
goModules: add environment to containsGoMod file (#2156)
1 parent 3f20049 commit c026b8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/goModules.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function containsModFile(folderPath: string): Promise<boolean> {
1111
return Promise.reject(new Error('Cannot find "go" binary. Update PATH or GOROOT appropriately.'));
1212
}
1313
return new Promise(resolve => {
14-
cp.execFile(goExecutable, ['env', 'GOMOD'], { cwd: folderPath }, (err, stdout) => {
14+
cp.execFile(goExecutable, ['env', 'GOMOD'], { cwd: folderPath, env: getToolsEnvVars() }, (err, stdout) => {
1515
if (err) {
1616
console.warn(`Error when running go env GOMOD: ${err}`);
1717
return resolve(false);

0 commit comments

Comments
 (0)