src/goEnvironmentStatus.ts: use the correct bin name on windows
Use correct executable names for GoEnvironmentOption's binpath.
Change-Id: I898d73bfa5e3f038f9fa391ca4039d7942f3ca80
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/245040
Reviewed-by: Brayden Cloud <bcloud@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
diff --git a/src/goEnvironmentStatus.ts b/src/goEnvironmentStatus.ts
index 1dd8865..f75dae7 100644
--- a/src/goEnvironmentStatus.ts
+++ b/src/goEnvironmentStatus.ts
@@ -393,7 +393,7 @@
// the path is assembled and used as the description
return subdirs.map((dir: string) =>
new GoEnvironmentOption(
- path.join(sdkPath, dir, 'bin', 'go'),
+ path.join(sdkPath, dir, 'bin', correctBinname('go')),
dir.replace('go', 'Go '),
)
);
@@ -409,7 +409,7 @@
// set Go version and command
const version = await getGoVersion();
return new GoEnvironmentOption(
- path.join(goroot, 'bin', 'go'),
+ path.join(goroot, 'bin', correctBinname('go')),
formatGoVersion(version.format()),
);
}