Skip to content

Commit 2473435

Browse files
author
Akos Kitta
committed
fix: trailing FQBN part if there are no configs
Signed-off-by: Akos Kitta <[email protected]>
1 parent b0422a7 commit 2473435

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: arduino-ide-extension/src/common/protocol/boards-service.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,8 @@ export namespace ConfigOption {
574574
const configSuffix = Object.entries(mergedOptions)
575575
.map(([option, value]) => `${option}=${value}`)
576576
.join(',');
577-
return `${vendor}:${arch}:${id}:${configSuffix}`;
577+
578+
return `${vendor}:${arch}:${id}${configSuffix ? `:${configSuffix}` : ''}`;
578579
}
579580

580581
export class ConfigOptionError extends Error {

Diff for: arduino-ide-extension/src/test/common/boards-service.test.ts

+6
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ describe('boards-service', () => {
104104
})
105105
);
106106

107+
it('should not append the trailing boards config part to FQBN if configs is empty', () => {
108+
const fqbn = 'a:b:c';
109+
const actual = ConfigOption.decorate(fqbn, []);
110+
expect(actual).to.be.equal(fqbn);
111+
});
112+
107113
it('should be noop when config options is empty', () => {
108114
const fqbn = 'a:b:c:menu1=value1';
109115
const actual = ConfigOption.decorate(fqbn, []);

0 commit comments

Comments
 (0)