ATL-530: No checks before upload/verify/burn

Made the port/fqbn/programmer optional for upload, verify,
and burn bootloader. From now on, the IDE does not warn the user before
performing the desired CLI command.

Closes arduino/arduino-pro-ide#364

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta
2020-11-05 09:16:49 +01:00
committed by Akos Kitta
parent acbb7d32b2
commit 2831acc5b5
8 changed files with 87 additions and 116 deletions

View File

@@ -63,13 +63,7 @@ export class VerifySketch extends SketchContribution {
}
try {
const { boardsConfig } = this.boardsServiceClientImpl;
if (!boardsConfig || !boardsConfig.selectedBoard) {
throw new Error('No boards selected. Please select a board.');
}
if (!boardsConfig.selectedBoard.fqbn) {
throw new Error(`No core is installed for the '${boardsConfig.selectedBoard.name}' board. Please install the core.`);
}
const fqbn = await this.boardsDataStore.appendConfigToFqbn(boardsConfig.selectedBoard.fqbn);
const fqbn = await this.boardsDataStore.appendConfigToFqbn(boardsConfig.selectedBoard?.fqbn);
this.outputChannelManager.getChannel('Arduino: compile').clear();
await this.coreService.compile({
sketchUri: uri,