installAllTools: skip tools specified in go.alternateTools (#3046)
diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts
index 93b42e9..bbe06d3 100644
--- a/src/goInstallTools.ts
+++ b/src/goInstallTools.ts
@@ -42,7 +42,13 @@
export async function installAllTools(updateExistingToolsOnly: boolean = false) {
const goVersion = await getGoVersion();
- const allTools = getConfiguredTools(goVersion);
+ let allTools = getConfiguredTools(goVersion);
+
+ // exclude tools replaced by alternateTools.
+ const alternateTools: { [key: string]: string } = getGoConfig().get('alternateTools');
+ allTools = allTools.filter((tool) => {
+ return !alternateTools[tool.name];
+ });
// Update existing tools by finding all tools the user has already installed.
if (updateExistingToolsOnly) {