Skip to content

Commit

Permalink
fix: delete SNYK_CLI_PATH notification handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawkyZ committed Oct 29, 2024
1 parent 43dcb32 commit c82b0f1
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/snyk/common/languageServer/languageServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c82b0f1

Please sign in to comment.