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

Commit

Permalink
Fix issue of missing non important tool not resulting in prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Feb 18, 2018
1 parent 6cc51f2 commit de7f7a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/goInstallTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export function promptForMissingTool(tool: string) {
if (missing.indexOf(tool) === -1) {
return;
}
missing = missing.filter(x => x === tool || importantTools.indexOf(x) > -1);
if (missing.length > 1) {
items.push('Install All');
}
Expand Down Expand Up @@ -308,6 +309,7 @@ export function offerToInstallTools() {

getGoVersion().then(goVersion => {
getMissingTools(goVersion).then(missing => {
missing = missing.filter(x => importantTools.indexOf(x) > -1);
if (missing.length > 0) {
showGoStatus('Analysis Tools Missing', 'go.promptforinstall', 'Not all Go tools are available on the GOPATH');
vscode.commands.registerCommand('go.promptforinstall', () => {
Expand Down Expand Up @@ -352,8 +354,7 @@ function getMissingTools(goVersion: SemVersion): Promise<string[]> {
resolve(exists ? null : tool);
});
}))).then(res => {
let missing = res.filter(x => x != null && importantTools.indexOf(x) > -1);
return missing;
return res.filter(x => x != null);
});
}

Expand Down

0 comments on commit de7f7a8

Please sign in to comment.