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

use last gopath element when installing tools #1988

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/goInstallTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ export function installTools(missing: string[]) {
// Else use the Current Gopath
let toolsGopath = getToolsGopath() || getCurrentGoPath();
if (toolsGopath) {
let paths = toolsGopath.split(path.delimiter);
toolsGopath = paths[0];
envForTools['GOPATH'] = toolsGopath;
} 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 => {
Expand Down