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

See how to contribute

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

Does this PR introduce a breaking change, and is titled accordingly?

Other information