Skip to content

Commit 8da2809

Browse files
committed
utils/pathUtils: add the new installation paths for windows
For golang/go#42070 Fixes #1252 Change-Id: I70e60a90075c275241100156ea392276da4fc042 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/297131 Trust: Hyang-Ah Hana Kim <[email protected]> Trust: Jason A. Donenfeld <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Jason A. Donenfeld <[email protected]>
1 parent cbb1479 commit 8da2809

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/pathUtils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ export function getBinPathWithPreferredGopathGorootWithExplanation(
106106
// Check common paths for go
107107
if (toolName === 'go') {
108108
const defaultPathsForGo =
109-
process.platform === 'win32' ? ['C:\\Go\\bin\\go.exe'] : ['/usr/local/go/bin/go', '/usr/local/bin/go'];
109+
process.platform === 'win32'
110+
? ['C:\\Program Files\\Go\\bin\\go.exe', 'C:\\Program Files (x86)\\Go\\bin\\go.exe']
111+
: ['/usr/local/go/bin/go', '/usr/local/bin/go'];
110112
for (const p of defaultPathsForGo) {
111113
if (executableFileExists(p)) {
112114
binPathCache[toolName] = p;

0 commit comments

Comments
 (0)