Skip to content

Commit

Permalink
fix: catch error if serverPath doesn't exist (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
hall authored Aug 16, 2022
1 parent d78b62d commit 95caf81
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import commandExists = require("command-exists");
let client: LanguageClient;

export async function activate(context: ExtensionContext): Promise<void> {
const cmdExists = await commandExists(config.serverPath);

if (!cmdExists) {
if (!commandExists.sync(config.serverPath)) {
const selection = await window.showErrorMessage<UriMessageItem>(
`Command ${config.serverPath} not found in $PATH`,
{
Expand Down

0 comments on commit 95caf81

Please sign in to comment.