From c82b0f144133dd2ec9b50e8b5b80165312aab90a Mon Sep 17 00:00:00 2001 From: Abdelrahman Shawki Hassan Date: Tue, 29 Oct 2024 16:38:52 +0100 Subject: [PATCH] fix: delete SNYK_CLI_PATH notification handling --- .../common/languageServer/languageServer.ts | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/src/snyk/common/languageServer/languageServer.ts b/src/snyk/common/languageServer/languageServer.ts index e1f77b47c..9d70afade 100644 --- a/src/snyk/common/languageServer/languageServer.ts +++ b/src/snyk/common/languageServer/languageServer.ts @@ -150,36 +150,6 @@ export class LanguageServer implements ILanguageServer { }); }); - client.onNotification(SNYK_CLI_PATH, ({ cliPath }: { cliPath: string }) => { - if (!cliPath) { - ErrorHandler.handle( - new Error("CLI path wasn't provided by language server on $/snyk.isAvailableCli notification " + cliPath), - this.logger, - "CLI path wasn't provided by language server on notification", - ); - return; - } - - this.configuration - .getCliPath() - .then(currentCliPath => { - if (currentCliPath != cliPath) { - this.logger.info('Setting Snyk CLI path to: ' + cliPath); - void this.configuration - .setCliPath(cliPath) - .then(() => { - this.cliReady$.next(cliPath); - }) - .catch((error: Error) => { - ErrorHandler.handle(error, this.logger, error.message); - }); - } - }) - .catch((error: Error) => { - ErrorHandler.handle(error, this.logger, error.message); - }); - }); - client.onNotification(SNYK_ADD_TRUSTED_FOLDERS, ({ trustedFolders }: { trustedFolders: string[] }) => { this.configuration.setTrustedFolders(trustedFolders).catch((error: Error) => { ErrorHandler.handle(error, this.logger, error.message);