fix: Sketch preprocessing errors were displayed on stdout instead of stderr by cmaglie · Pull Request #2806 · arduino/arduino-cli (original) (raw)
Please check if the PR fulfills these requirements
- The PR has no duplicates (please search among the Pull Requests
before creating one) - The PR follows
our contributing guidelines - Tests for the changes have been added (for bug fixes / features)
- Docs have been added / updated (for bug fixes / features)
UPGRADING.mdhas been updated with a migration guide (for breaking changes)configuration.schema.jsonupdated if new parameters are added.
What kind of change does this PR introduce?
Fix the error output during sketch preprocessing wrongly redirected to stdout instead of stderr.
What is the current behavior?
$ arduino-cli compile -b arduino:avr:uno
/home/megabug/Arduino/Blink/Blink.ino:1:2: error: #error eeee
#error eeee
^~~~~
$ arduino-cli compile -b arduino:avr:uno 1> /dev/null
Error during build: exit status 1
What is the new behavior?
$ arduino-cli compile -b arduino:avr:uno
/home/megabug/Arduino/Blink/Blink.ino:1:2: error: #error eeee
#error eeee
^~~~~
$ arduino-cli compile -b arduino:avr:uno 1> /dev/null
/home/megabug/Arduino/Blink/Blink.ino:1:2: error: #error eeee
#error eeee
^~~~~
Error during build: exit status 1