From 11dbe4910cdcfdfab0e5f1eeea436c84309692be Mon Sep 17 00:00:00 2001 From: Robert Rossmann Date: Fri, 16 Aug 2019 17:59:41 +0200 Subject: [PATCH] Improve error discovery when the LSP process cannot be started --- vscode-client/src/extension.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vscode-client/src/extension.ts b/vscode-client/src/extension.ts index c6c6c3f20..d144c9c54 100644 --- a/vscode-client/src/extension.ts +++ b/vscode-client/src/extension.ts @@ -29,7 +29,7 @@ export async function activate(context: ExtensionContext) { start(context, command, explainshellEndpoint, highlightParsingErrors) } catch (error) { - handleMissingExecutable() + handleStartError(error) } } @@ -93,7 +93,9 @@ function handleOutdatedExecutable() { window.showErrorMessage(message, { modal: false }) } -function handleMissingExecutable() { - const message = `Can't find bash-language-server on your PATH. Please install it using "npm i -g bash-language-server".` +function handleStartError(error: Error) { + const message = + 'Unable to start bash-language-server, did you install it? Open DevTools for additional details.' + console.error(error) window.showErrorMessage(message, { modal: false }) }