Closed
Description
Describe the problem
When running arduino-cli upload [...] --format json
the CLI command doesn't respond with JSON output on the command line. A successful run seems to return no output, while errors are simply written to stdout.
To reproduce
Open the terminal and upload any sketch with the --format json
option.
For example: arduino-cli upload /home/user/Arduino/MySketch --format json
In my specific case:
arduino-cli upload -p /usb/usbmode4133 --fqbn "arduino:avr:uno" -i ./assets/arduino/firmwares/uno/StandardFirmataPlus.hex --format json
avrdude: ser_open(): can't open device "/usb/usbmode4133": No such file or directory
Error during Upload: Failed uploading: uploading error: exit status 1
Expected behavior
If the upload was successful, there should be a positive response encoded as JSON, for example:
{
"uploaded": true,
"verified": false,
"sketchName": "MyExample.ino"
}
If there were errors, the errors should be displayed in a JSON format, not simple text.
Arduino CLI version
Version: 0.28.0 Commit: 06fb190 Date: 2022-10-18T15:53:04Z
Operating system
macOS
Operating system version
macOS 12.6
Additional context
No response
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the nightly build
- My report contains all necessary details