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

Commit

Permalink
Ignore GOBIN whe go.toolsGopath is set #2339
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Mar 28, 2019
1 parent b597ae8 commit 9f99c30
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/goInstallTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,13 @@ export function installTools(missing: string[], goVersion: SemVersion) {

// If the go.toolsGopath is set, use its value as the GOPATH for the "go get" child process.
// Else use the Current Gopath
let toolsGopath = getToolsGopath() || getCurrentGoPath();
let toolsGopath = getToolsGopath();
if (toolsGopath) {
// User has explicitly chosen to use toolsGopath, so ignore GOBIN
envForTools['GOBIN'] = '';
} else {
toolsGopath = getCurrentGoPath();
}
if (toolsGopath) {
const paths = toolsGopath.split(path.delimiter);
toolsGopath = paths[0];
Expand Down

0 comments on commit 9f99c30

Please sign in to comment.