Commit 87068d2
committed
Let utils.ExecCommand print the command in verbose mode
Previously, the command was printed by PrepareCommandForRecipe. Letting
ExecCommand print seems more accurate, since it is only printed when it
is actually run (though this already happened in practice).
Additionally, the command can now be modified between
PrepareCommandForRecipe and ExecCommand while preserving correct output.
Since ExecCommand deals with a slice of arguments instead of a single
command string, this requires merging them together into a proper
commandline. Some care is taken to quote arguments containing
spaces, quotes or backslashes, though this is mostly intended for
display purposes. Arguments are only quoted when needed, regardless of
whether they were quoted in the original pattern.
Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>1 parent ee0f079 commit 87068d2
File tree
3 files changed
+42
-5
lines changed- src/arduino.cc/builder
- builder_utils
- test
- utils
3 files changed
+42
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
386 | 385 | | |
387 | 386 | | |
388 | 387 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | 388 | | |
394 | 389 | | |
395 | 390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
73 | 92 | | |
74 | 93 | | |
75 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
258 | 277 | | |
259 | 278 | | |
260 | 279 | | |
| |||
263 | 282 | | |
264 | 283 | | |
265 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
266 | 289 | | |
267 | 290 | | |
268 | 291 | | |
| |||
0 commit comments