suppress error from updateimports (#67)

This commit is contained in:
Dima 2023-12-13 14:49:37 +07:00 committed by GitHub
parent e11ec1bd5b
commit 60bd5335b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,8 +127,13 @@ export class SettingsManager {
if (info.isImportsUpdateNeeded(this.cliCallDelay)) {
const path = URI.parse(uri).fsPath;
const imports = await this.cli.imports(path);
info.updateImports(imports);
try {
const imports = await this.cli.imports(path);
info.updateImports(imports);
} catch (e) {
// try-catch is needed, because server will crash if there will be no Fluence CLI installed
console.error('Cannot update imports: ', e);
}
}
this.documents.set(uri, info);