Skip to content

Commit 58fa653

Browse files
authored
Merge pull request #47 from Alex079/fix-args-duplication
Fix args duplication
2 parents 5e842e1 + 3113cb8 commit 58fa653

File tree

4 files changed

+230
-279
lines changed

4 files changed

+230
-279
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v2.2.1
2+
- Fix arguments duplication for Atmel version of avr-size
3+
14
## v2.2.0
25
- Make "Flash" task a custom execution
36
- Output generated shell commands

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"url": "https://github.com/Alex079/vscode-avr-helper"
1818
},
1919
"publisher": "Alex079",
20-
"version": "2.2.0",
20+
"version": "2.2.1",
2121
"engines": {
2222
"vscode": "^1.64.2"
2323
},

src/main/actions/Builder.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,11 @@ function build(uri: Uri, emitter: PrintEmitter) {
237237
})
238238
.then(() => {
239239
const reporterArgs = C.REPORTER_ARGS.get(uri) ?? [];
240+
const mcuArgs = [];
240241
if (reporterArgs.includes('-C')) {
241-
reporterArgs.push(`--mcu=${devType}`);
242+
mcuArgs.push(`--mcu=${devType}`);
242243
}
243-
return runCommand(join(dirname(exe), 'avr-size'), [...reporterArgs, buildTarget], uri.fsPath, emitter)
244+
return runCommand(join(dirname(exe), 'avr-size'), [...reporterArgs, ...mcuArgs, buildTarget], uri.fsPath, emitter)
244245
.then(info => {
245246
if (info.status.exitCode === 0) {
246247
emitter.fireLine(info.stdout);
@@ -255,9 +256,9 @@ function printInfo(uri: Uri, emitter: PrintEmitter) {
255256
linkables.forEach((linkable, index) => {
256257
const search: string = `${uri.fsPath}${sep}`;
257258
emitter.fireLine(`${index === 0 ? ' ' : '│'} ┌─${linkable.source.replace(search, '')}`);
258-
emitter.fireLine(`${index === 0 ? '┌' : '├'}${linkable.needsRebuilding ? '' : '┴'}${linkable.target.replace(search, '')}`);
259+
emitter.fireLine(`${index === 0 ? '┌' : '├'}${linkable.needsRebuilding ? 'X' : '┴'}${linkable.target.replace(search, '')}`);
259260
emitter.fireLine('│');
260261
});
261-
emitter.fireLine( `└─ Build Target\n`);
262+
emitter.fireLine( `└─> Build Target\n`);
262263
};
263264
}

0 commit comments

Comments
 (0)