Ignore GOBIN whe go.toolsGopath is set #2339

This commit is contained in:
Ramya Achutha Rao 2019-03-28 11:45:31 -07:00
Родитель b597ae8f52
Коммит 9f99c306e0
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -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];