Skip to content

Commit

Permalink
Consolidate all boardDescriptor argument pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
hlovdal authored and adiazulay committed Jan 19, 2021
1 parent a6512a4 commit 8b83873
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/arduino/arduino.ts
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,9 @@ export class ArduinoApp {
}
const boardDescriptor = this.boardManager.currentBoard.getBuildConfig();

if (!this.useArduinoCli()) {
if (this.useArduinoCli()) {
args.push("-b", boardDescriptor);
} else {
args.push("--board", boardDescriptor);
}

Expand Down Expand Up @@ -561,7 +563,6 @@ export class ArduinoApp {
} else {
args.push("upload");
}
args.push("-b", boardDescriptor);
}

if (dc.port) {
Expand Down Expand Up @@ -591,7 +592,6 @@ export class ArduinoApp {
} else {
args.push("upload");
}
args.push("-b", boardDescriptor);
}

if (this.useArduinoCli()) {
Expand All @@ -603,14 +603,10 @@ export class ArduinoApp {
args.push("--port", dc.port);
if (!this.useArduinoCli()) {
args.push("--verify");
} else {
args.push("compile", "-b", boardDescriptor);
}
} else {
if (!this.useArduinoCli()) {
args.push("--verify");
} else {
args.push("compile", "-b", boardDescriptor);
}
}

Expand Down

0 comments on commit 8b83873

Please sign in to comment.