mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-15 23:36:33 +00:00
Stop LS when user picks a board that has no core.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
parent
cdadda85e5
commit
8e1feb36ff
@ -234,6 +234,16 @@ export class ArduinoFrontendContribution implements FrontendApplicationContribut
|
||||
if (!details) {
|
||||
// Core is not installed for the selected board.
|
||||
console.info(`Could not start language server for ${fqbn}. The core is not installed for the board.`);
|
||||
if (this.languageServerFqbn) {
|
||||
try {
|
||||
await this.commandRegistry.executeCommand('arduino.languageserver.stop');
|
||||
console.info(`Stopped language server process for ${this.languageServerFqbn}.`);
|
||||
this.languageServerFqbn = undefined;
|
||||
} catch (e) {
|
||||
console.error(`Failed to start language server process for ${this.languageServerFqbn}`, e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (fqbn === this.languageServerFqbn) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user