Skip to content

Commit e6b8fe7

Browse files
MichaelCurrinhyangah
authored andcommitted
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: 4bd16d8 GitHub-Pull-Request: #1651 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/337690 Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Trust: Hyang-Ah Hana Kim <[email protected]> Trust: Suzy Mueller <[email protected]>
1 parent 80c1b5c commit e6b8fe7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/goInstallTools.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ Run "go get -v ${getImportPath(tool, goVersion)}" to install.`;
365365
msg = `The ["${tool.name}"](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md) command is not available.
366366
Please select "Install", or follow the installation instructions [here](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md#updating-dlv-dap).`;
367367
}
368+
368369
const selected = await vscode.window.showErrorMessage(msg, ...installOptions);
369370
switch (selected) {
370371
case 'Install':
@@ -591,9 +592,10 @@ let suggestedDownloadGo = false;
591592

592593
async function suggestDownloadGo() {
593594
const msg =
594-
`Failed to find the "go" binary in either GOROOT(${getCurrentGoRoot()}) or PATH(${envPath}).` +
595+
`Failed to find the "go" binary in either GOROOT(${getCurrentGoRoot()}) or PATH(${envPath}). ` +
595596
'Check PATH, or Install Go and reload the window. ' +
596597
"If PATH isn't what you expected, see https://github.com/golang/vscode-go/issues/971";
598+
597599
if (suggestedDownloadGo) {
598600
vscode.window.showErrorMessage(msg);
599601
return;
@@ -617,7 +619,9 @@ export async function latestToolVersion(tool: Tool, includePrerelease?: boolean)
617619
const goCmd = getBinPath('go');
618620
const tmpDir = await tmpDirForToolInstallation();
619621
const execFile = util.promisify(cp.execFile);
622+
620623
let ret: semver.SemVer | null = null;
624+
621625
try {
622626
const env = toolInstallationEnvironment();
623627
env['GO111MODULE'] = 'on';
@@ -690,10 +694,12 @@ export async function shouldUpdateTool(tool: Tool, toolPath: string): Promise<bo
690694
if (checkForUpdates === 'off') {
691695
return false;
692696
}
697+
693698
const { moduleVersion } = await inspectGoToolVersion(toolPath);
694699
if (!moduleVersion) {
695700
return false; // failed to inspect the tool version.
696701
}
702+
697703
const localVersion = semver.parse(moduleVersion, { includePrerelease: true });
698704
if (!localVersion) {
699705
// local version can't be determined. e.g. (devel)

0 commit comments

Comments
 (0)