Skip to content

Commit

Permalink
src/goInstallTools: fix broken gocode-gomod install
Browse files Browse the repository at this point in the history
?? is misused. It should be || because at some point
the extension sets GOBIN to ''.

Change-Id: I206e290da9a21abbfb1cc0a90a3fda6dec6a65d6
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/277293
Trust: Hyang-Ah Hana Kim <[email protected]>
Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
TryBot-Result: kokoro <[email protected]>
Reviewed-by: Rebecca Stambler <[email protected]>
  • Loading branch information
hyangah committed Dec 12, 2020
1 parent 1812139 commit 0dee1a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/goInstallTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export async function installTool(
logVerbose(`install: %s %s\n%s%s`, goBinary, args.join(' '), stdout, stderr);

if (hasModSuffix(tool)) { // Actual installation of the -gomod tool is done by running go build.
const gopath = env['GOBIN'] ?? env['GOPATH'];
const gopath = env['GOBIN'] || env['GOPATH'];
if (!gopath) {
return `GOBIN/GOPATH not configured in environment`;
}
Expand Down

0 comments on commit 0dee1a8

Please sign in to comment.