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/installation') 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