Skip to content
Snippets Groups Projects
Commit fb210632 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(gomod): pass GOPROXY

Closes #4071
parent e74b7c85
Branches
No related tags found
No related merge requests found
...@@ -39,7 +39,8 @@ async function updateArtifacts( ...@@ -39,7 +39,8 @@ async function updateArtifacts(
} }
await fs.outputFile(localGoModFileName, massagedGoMod); await fs.outputFile(localGoModFileName, massagedGoMod);
const localGoSumFileName = upath.join(config.localDir, sumFileName); const localGoSumFileName = upath.join(config.localDir, sumFileName);
const env = getChildProcessEnv(['GOPATH']); const customEnv = ['GOPATH', 'GOPROXY'];
const env = getChildProcessEnv(customEnv);
const startTime = process.hrtime(); const startTime = process.hrtime();
let cmd; let cmd;
if (config.binarySource === 'docker') { if (config.binarySource === 'docker') {
...@@ -47,7 +48,7 @@ async function updateArtifacts( ...@@ -47,7 +48,7 @@ async function updateArtifacts(
cmd = `docker run --rm `; cmd = `docker run --rm `;
const volumes = [config.localDir, process.env.GOPATH]; const volumes = [config.localDir, process.env.GOPATH];
cmd += volumes.map(v => `-v ${v}:${v} `).join(''); cmd += volumes.map(v => `-v ${v}:${v} `).join('');
const envVars = ['GOPATH']; const envVars = customEnv;
cmd += envVars.map(e => `-e ${e} `).join(''); cmd += envVars.map(e => `-e ${e} `).join('');
cmd += '-e CGO_ENABLED=0 '; cmd += '-e CGO_ENABLED=0 ';
cmd += `-w ${cwd} `; cmd += `-w ${cwd} `;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment