Skip to content

Commit 48499ec

Browse files
author
Akos Kitta
committed
fix: do not allow detected board to be inferred
Signed-off-by: Akos Kitta <[email protected]>
1 parent b71abc4 commit 48499ec

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

arduino-ide-extension/src/common/protocol/board-list.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,12 @@ export function createBoardList(
233233
if (
234234
isBoardIdentifier(board) &&
235235
isBoardIdentifier(inferredBoard) &&
236-
!boardIdentifierEquals(board, inferredBoard)
236+
!boardIdentifierEquals(board, inferredBoard) &&
237+
// The inferred board cannot be one of the detected boards. For example, {"matching_boards":[{"name":"Arduino Nano ESP32","fqbn":"arduino:esp32:nano_nora"},{"name":"Arduino Nano ESP32","fqbn":"esp32:esp32:nano_nora"}]}
238+
boards.every(
239+
(otherDetectedBoardOnPort) =>
240+
!boardIdentifierEquals(inferredBoard, otherDetectedBoardOnPort)
241+
)
237242
) {
238243
const inferredItem: InferredBoardListItem = {
239244
inferredBoard,

0 commit comments

Comments
 (0)