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

Commit 8227014

Browse files
hlovdaladiazulay
authored andcommitted
Add selectSerial expression
1 parent 990c1a1 commit 8227014

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/arduino/arduino.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,17 @@ export class ArduinoApp {
124124
await this.getMainSketch(dc);
125125
}
126126

127-
if ((!dc.configuration || !/upload_method=[^=,]*st[^,]*link/i.test(dc.configuration)) && !dc.port) {
127+
const selectSerial = async () => {
128128
const choice = await vscode.window.showInformationMessage(
129129
"Serial port is not specified. Do you want to select a serial port for uploading?",
130130
"Yes", "No");
131131
if (choice === "Yes") {
132132
vscode.commands.executeCommand("arduino.selectSerialPort");
133133
}
134+
}
135+
136+
if ((!dc.configuration || !/upload_method=[^=,]*st[^,]*link/i.test(dc.configuration)) && !dc.port) {
137+
await selectSerial();
134138
return;
135139
}
136140

0 commit comments

Comments
 (0)