Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 8b83873

Browse files
hlovdaladiazulay
authored andcommitted
Consolidate all boardDescriptor argument pushing
1 parent a6512a4 commit 8b83873

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/arduino/arduino.ts

+3-7
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,9 @@ export class ArduinoApp {
512512
}
513513
const boardDescriptor = this.boardManager.currentBoard.getBuildConfig();
514514

515-
if (!this.useArduinoCli()) {
515+
if (this.useArduinoCli()) {
516+
args.push("-b", boardDescriptor);
517+
} else {
516518
args.push("--board", boardDescriptor);
517519
}
518520

@@ -561,7 +563,6 @@ export class ArduinoApp {
561563
} else {
562564
args.push("upload");
563565
}
564-
args.push("-b", boardDescriptor);
565566
}
566567

567568
if (dc.port) {
@@ -591,7 +592,6 @@ export class ArduinoApp {
591592
} else {
592593
args.push("upload");
593594
}
594-
args.push("-b", boardDescriptor);
595595
}
596596

597597
if (this.useArduinoCli()) {
@@ -603,14 +603,10 @@ export class ArduinoApp {
603603
args.push("--port", dc.port);
604604
if (!this.useArduinoCli()) {
605605
args.push("--verify");
606-
} else {
607-
args.push("compile", "-b", boardDescriptor);
608606
}
609607
} else {
610608
if (!this.useArduinoCli()) {
611609
args.push("--verify");
612-
} else {
613-
args.push("compile", "-b", boardDescriptor);
614610
}
615611
}
616612

0 commit comments

Comments
 (0)