Skip to content

Commit d7563f6

Browse files
committed
src/goInstallTools: use GOROOT/bin for gocode-gomod build too
This should've been done in cl/263977. Update #757 Change-Id: I51afbc8a2534c1b3f304ba988b6bcec9c944a048 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/264318 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Suzy Mueller <suzmue@golang.org>
1 parent 3493cfe commit d7563f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/goInstallTools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,15 @@ export async function installTool(
241241

242242
// TODO(rstambler): Figure out why this happens and maybe delete it.
243243
if (stderr.indexOf('unexpected directory layout:') > -1) {
244-
await execFile(goVersion.binaryPath, args, opts);
244+
await execFile(goBinary, args, opts);
245245
} else if (hasModSuffix(tool)) {
246246
const gopath = env['GOPATH'];
247247
if (!gopath) {
248248
return `GOPATH not configured in environment`;
249249
}
250250
const destDir = gopath.split(path.delimiter)[0];
251251
const outputFile = path.join(destDir, 'bin', process.platform === 'win32' ? `${tool.name}.exe` : tool.name);
252-
await execFile(goVersion.binaryPath, ['build', '-o', outputFile, importPath], opts);
252+
await execFile(goBinary, ['build', '-o', outputFile, importPath], opts);
253253
}
254254
const toolInstallPath = getBinPath(tool.name);
255255
outputChannel.appendLine(`Installing ${toolImportPath} (${toolInstallPath}) SUCCEEDED`);

0 commit comments

Comments
 (0)