IDE to run CLI with auto assigned port (#673)

* get daemon port from CLI stdout

* config-service to use CLI daemon port

* updating LS

* fixed tests

* fix upload blocked when selectedBoard.port is undefined

* bump arduino-cli to 0.20.2

Co-authored-by: Alberto Iannaccone <a.iannaccone@arduino.cc>
This commit is contained in:
Francesco Stasi
2021-12-09 15:08:26 +01:00
committed by GitHub
parent 767b09d2f1
commit 49d12d99ff
10 changed files with 88 additions and 75 deletions

View File

@@ -63,7 +63,9 @@ export class UploadSketch extends SketchContribution {
if (!fqbn) {
return '';
}
const address = boardsConfig.selectedBoard?.port?.address;
const address =
boardsConfig.selectedBoard?.port?.address ||
boardsConfig.selectedPort?.address;
if (!address) {
return '';
}
@@ -277,8 +279,8 @@ export class UploadSketch extends SketchContribution {
{ timeout: 3000 }
);
} catch (e) {
let errorMessage = "";
if (typeof e === "string") {
let errorMessage = '';
if (typeof e === 'string') {
errorMessage = e;
} else {
errorMessage = e.toString();