Skip to content

Commit b92b631

Browse files
vscode-go: add option to disable tool recompilation prompts
1 parent 77a4fdb commit b92b631

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

extension/package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -1558,6 +1558,12 @@
15581558
"description": "Automatically update the tools used by the extension, without prompting the user.",
15591559
"scope": "resource"
15601560
},
1561+
"go.toolsManagement.warnOutdated": {
1562+
"type": "boolean",
1563+
"default": true,
1564+
"description": "Warn the user if the tools used by the extension appear outdated, or are not regular Go binaries. This has no effect if `go.toolsManagement.autoUpdate` is true.",
1565+
"scope": "resource"
1566+
},
15611567
"go.enableCodeLens": {
15621568
"type": "object",
15631569
"properties": {
@@ -2852,4 +2858,4 @@
28522858
}
28532859
]
28542860
}
2855-
}
2861+
}

extension/src/goInstallTools.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ export async function suggestUpdates() {
822822
const toolsManagementConfig = getGoConfig()['toolsManagement'];
823823
if (toolsManagementConfig && toolsManagementConfig['autoUpdate'] === true) {
824824
installTools(toolsToUpdate, configuredGoVersion, { silent: true });
825-
} else {
825+
} else if (toolsManagementConfig && toolsManagementConfig['warnOutdated'] === true) {
826826
const updateToolsCmdText = 'Update tools';
827827
const selected = await vscode.window.showWarningMessage(
828828
`Tools (${toolsToUpdate.map((tool) => tool.name).join(', ')}) need recompiling to work with ${

0 commit comments

Comments
 (0)