From fa7b91a2f7732d78f1b7af52fc26bcf57f1c0044 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Sun, 9 Feb 2020 21:55:29 +0200 Subject: vscode: removed unnecessary awaits --- editors/code/src/installation/language_server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'editors/code/src') diff --git a/editors/code/src/installation/language_server.ts b/editors/code/src/installation/language_server.ts index 1ce67b8b2..9fb1ce42e 100644 --- a/editors/code/src/installation/language_server.ts +++ b/editors/code/src/installation/language_server.ts @@ -100,12 +100,12 @@ export async function ensureLanguageServerBinary( try { await downloadLatestLanguageServer(langServerSource); } catch (err) { - await vscode.window.showErrorMessage( + vscode.window.showErrorMessage( `Failed to download language server from ${langServerSource.repo.name} ` + `GitHub repository: ${err.message}` ); - await dns.resolve('www.google.com').catch(err => { + dns.resolve('www.google.com').catch(err => { console.error("DNS resolution failed, there might be an issue with Internet availability"); console.error(err); }); -- cgit v1.2.3 From 5d39f6d3b2fe9fcb08a9e9d4bad7edc42b3c9ea2 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Sun, 9 Feb 2020 22:00:33 +0200 Subject: vscode: add on-success logic to dns resolution sanity check --- editors/code/src/installation/language_server.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'editors/code/src') diff --git a/editors/code/src/installation/language_server.ts b/editors/code/src/installation/language_server.ts index 9fb1ce42e..fd8b2caac 100644 --- a/editors/code/src/installation/language_server.ts +++ b/editors/code/src/installation/language_server.ts @@ -105,10 +105,13 @@ export async function ensureLanguageServerBinary( `GitHub repository: ${err.message}` ); - dns.resolve('www.google.com').catch(err => { - console.error("DNS resolution failed, there might be an issue with Internet availability"); - console.error(err); - }); + dns.resolve('www.google.com').then( + addrs => console.log("DNS resolution was successful", addrs), + err => { + console.error("DNS resolution failed, there might be an issue with Internet availability"); + console.error(err); + } + ); return null; } -- cgit v1.2.3 From e709f113c107c75a7da86c39f6cdcb6d61dc360d Mon Sep 17 00:00:00 2001 From: Veetaha Date: Sun, 9 Feb 2020 22:27:01 +0200 Subject: vscode: changed dns sanity-check url from google.com to example.com --- editors/code/src/installation/language_server.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'editors/code/src') diff --git a/editors/code/src/installation/language_server.ts b/editors/code/src/installation/language_server.ts index fd8b2caac..3510f9178 100644 --- a/editors/code/src/installation/language_server.ts +++ b/editors/code/src/installation/language_server.ts @@ -105,10 +105,13 @@ export async function ensureLanguageServerBinary( `GitHub repository: ${err.message}` ); - dns.resolve('www.google.com').then( - addrs => console.log("DNS resolution was successful", addrs), + dns.resolve('example.com').then( + addrs => console.log("DNS resolution for example.com was successful", addrs), err => { - console.error("DNS resolution failed, there might be an issue with Internet availability"); + console.error( + "DNS resolution for example.com failed, " + + "there might be an issue with Internet availability" + ); console.error(err); } ); -- cgit v1.2.3