Skip to content

Commit

Permalink
fix: sanitize FQBNs from data store before compare
Browse files Browse the repository at this point in the history
FQBNs can be detected with custom board configs. Make sure to sanitize
all FQBNs before comparing them.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
  • Loading branch information
Akos Kitta committed Jun 27, 2023
1 parent 2473435 commit 0caf0ca
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ export class InoLanguage extends SketchContribution {
`Failed to sanitize the FQBN of the running language server. FQBN with the board settings was: ${this.languageServerFqbn}`
);
}
// The incoming FQBNs might contain custom boards configs, sanitize them before the comparison.
// https://github.com/arduino/arduino-ide/pull/2113#pullrequestreview-1499998328
const matchingFqbn = dataChangePerFqbn.find(
(fqbn) => sanitizedFqbn === fqbn
(fqbn) => sanitizedFqbn === sanitizeFqbn(fqbn)
);
const { boardsConfig } = this.boardsServiceProvider;
if (
Expand Down

0 comments on commit 0caf0ca

Please sign in to comment.