use first gopath element when installing tools (#1988)
This commit is contained in:
Родитель
382806bedf
Коммит
b6306a53bb
|
@ -299,6 +299,8 @@ export function installTools(missing: string[]) {
|
||||||
// Else use the Current Gopath
|
// Else use the Current Gopath
|
||||||
let toolsGopath = getToolsGopath() || getCurrentGoPath();
|
let toolsGopath = getToolsGopath() || getCurrentGoPath();
|
||||||
if (toolsGopath) {
|
if (toolsGopath) {
|
||||||
|
let paths = toolsGopath.split(path.delimiter);
|
||||||
|
toolsGopath = paths[0];
|
||||||
envForTools['GOPATH'] = toolsGopath;
|
envForTools['GOPATH'] = toolsGopath;
|
||||||
} else {
|
} else {
|
||||||
vscode.window.showInformationMessage('Cannot install Go tools. Set either go.gopath or go.toolsGopath in settings.', 'Open User Settings', 'Open Workspace Settings').then(selected => {
|
vscode.window.showInformationMessage('Cannot install Go tools. Set either go.gopath or go.toolsGopath in settings.', 'Open User Settings', 'Open Workspace Settings').then(selected => {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче