fix: no required programmer for debug --info

Ref: arduino/arduino-cli#2540
Closes: arduino/arduino-ide#2368

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta
2024-02-15 18:34:16 +01:00
committed by Akos Kitta
parent 1a98485b02
commit 4a807ab538
7 changed files with 12 additions and 27 deletions

View File

@@ -398,12 +398,9 @@ export async function isDebugEnabled(
`Failed to append boards config to the FQBN. Original FQBN was: ${fqbn}`
);
}
if (!data.selectedProgrammer) {
throw new Error(noProgrammerSelectedFor(board.name));
}
const params = {
fqbn: fqbnWithConfig,
programmer: data.selectedProgrammer.id,
programmer: data.selectedProgrammer?.id,
};
try {
const debugFqbn = await checkDebugEnabled(params);
@@ -443,13 +440,3 @@ export function debuggingNotSupported(boardName: string): string {
boardName
);
}
/**
* (non-API)
*/
export function noProgrammerSelectedFor(boardName: string): string {
return nls.localize(
'arduino/debug/noProgrammerSelectedFor',
"No programmer selected for '{0}'",
boardName
);
}