Gerrit Bot has uploaded this change for review.
src/goInstallTools.ts: correct spacing in error message on Go not found
- Add space between `.` and `Check`, to fix this error:
<img width="300" alt="Screen Shot 2021-07-27 at 11 02 41 am" src="https://user-images.githubusercontent.com/18750745/127128285-8cbaaaaa-54eb-49eb-b552-a1453e425d6a.png">
- Add empty lines to break up dense code (a lot of lines without spaces) into logical groups.
Change-Id: Ice9b755d8c558c1dec2d30ae9d619c909664336b
GitHub-Last-Rev: 4bd16d8dfe1e9f8e79f14a5d42849a28eeb93152
GitHub-Pull-Request: golang/vscode-go#1651
---
M src/goInstallTools.ts
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts
index b234b51..515ea4a 100644
--- a/src/goInstallTools.ts
+++ b/src/goInstallTools.ts
@@ -365,6 +365,7 @@
msg = `The ["${tool.name}"](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md) command is not available.
Please select "Install", or follow the installation instructions [here](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md#updating-dlv-dap).`;
}
+
const selected = await vscode.window.showErrorMessage(msg, ...installOptions);
switch (selected) {
case 'Install':
@@ -591,9 +592,10 @@
async function suggestDownloadGo() {
const msg =
- `Failed to find the "go" binary in either GOROOT(${getCurrentGoRoot()}) or PATH(${envPath}).` +
+ `Failed to find the "go" binary in either GOROOT(${getCurrentGoRoot()}) or PATH(${envPath}). ` +
'Check PATH, or Install Go and reload the window. ' +
"If PATH isn't what you expected, see https://github.com/golang/vscode-go/issues/971";
+
if (suggestedDownloadGo) {
vscode.window.showErrorMessage(msg);
return;
@@ -617,7 +619,9 @@
const goCmd = getBinPath('go');
const tmpDir = await tmpDirForToolInstallation();
const execFile = util.promisify(cp.execFile);
+
let ret: semver.SemVer | null = null;
+
try {
const env = toolInstallationEnvironment();
env['GO111MODULE'] = 'on';
@@ -690,10 +694,12 @@
if (checkForUpdates === 'off') {
return false;
}
+
const { moduleVersion } = await inspectGoToolVersion(toolPath);
if (!moduleVersion) {
return false; // failed to inspect the tool version.
}
+
const localVersion = semver.parse(moduleVersion, { includePrerelease: true });
if (!localVersion) {
// local version can't be determined. e.g. (devel)
To view, visit change 337690. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Hyang-Ah Hana Kim.
Gerrit Bot uploaded patch set #2 to this change.
src/goInstallTools.ts: correct spacing in error message on Go not found
- Add space to fix bad message. ").Check PATH" to "). Check PATH".
- Add empty lines to break up dense code (a lot of lines without spaces) into logical groups.
Change-Id: Ice9b755d8c558c1dec2d30ae9d619c909664336b
GitHub-Last-Rev: 4bd16d8dfe1e9f8e79f14a5d42849a28eeb93152
GitHub-Pull-Request: golang/vscode-go#1651
---
M src/goInstallTools.ts
1 file changed, 7 insertions(+), 1 deletion(-)
To view, visit change 337690. To unsubscribe, or for help writing mail filters, visit settings.
Patch set 2:Run-TryBot +1Code-Review +2Trust +1
1 comment:
Patchset:
Thanks!
To view, visit change 337690. To unsubscribe, or for help writing mail filters, visit settings.
Kokoro presubmit build finished with status: SUCCESS
Logs at: https://source.cloud.google.com/results/invocations/9466412a-6bd4-4188-80c5-ffa008356d9f
Patch set 2:TryBot-Result +1
Patch set 2:Trust +1
Hyang-Ah Hana Kim submitted this change.
src/goInstallTools.ts: correct spacing in error message on Go not found
- Add space to fix bad message. ").Check PATH" to "). Check PATH".
- Add empty lines to break up dense code (a lot of lines without spaces) into logical groups.
Change-Id: Ice9b755d8c558c1dec2d30ae9d619c909664336b
GitHub-Last-Rev: 4bd16d8dfe1e9f8e79f14a5d42849a28eeb93152
GitHub-Pull-Request: golang/vscode-go#1651
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/337690
Reviewed-by: Hyang-Ah Hana Kim <hya...@gmail.com>
Trust: Hyang-Ah Hana Kim <hya...@gmail.com>
Trust: Suzy Mueller <suz...@golang.org>
---
M src/goInstallTools.ts
1 file changed, 7 insertions(+), 1 deletion(-)
To view, visit change 337690. To unsubscribe, or for help writing mail filters, visit settings.