We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please provide a broader range of exit codes. It's very often 1, making it hard to handle errors programmatically.
These are different kinds of programmer and user errors, but it takes time to figure them out because the exit code is the same:
XXX@ arduino-cli % cat ./test_sketch/ok/ok.ino void setup() {} void loop() {} XXX@ arduino-cli % cat ./test_sketch/broken/broken.ino trash XXX@ arduino-cli % ./arduino-cli version arduino-cli Version: git-snapshot Commit: 357d4653 Date: 2023-01-03T09:30:23Z XXX@ arduino-cli % ./arduino-cli compile -b arduino:avr:uno ./test_sketch/broken /Users/XXX/dev/arduino-cli/test_sketch/broken/broken.ino:1:1: error: 'trash' does not name a type; did you mean 'tanh'? trash ^~~~~ tanh Used platform Version Path arduino:avr 1.8.5 /Users/XXX/Library/Arduino15/packages/arduino/hardware/avr/1.8.5 Error during build: exit status 1 XXX@ arduino-cli % echo $? 1 XXX@ ./arduino-cli compile -b arduino:avr:uno ./test_sketch/missing Error opening sketch: no such file or directory: /Users/XXX/dev/arduino-cli/test_sketch/missing XXX@ arduino-cli % echo $? 1 XXX@ arduino-cli % ./arduino-cli compile -b arduino:mbed:nanorp2040connect ./test_sketch/ok Used platform Version Path Error during build: Platform 'arduino:mbed' not found: platform not installed Try running `arduino-cli core install arduino:mbed` XXX@ arduino-cli % echo $? 1 XXX@ arduino-cli % ./arduino-cli compile -b trash:fqbn ./test_sketch/ok Used platform Version Path Error during build: Invalid FQBN: not an FQBN: trash:fqbn XXX@ arduino-cli % echo $? 1 XXX@ arduino-cli % ./arduino-cli compile ./test_sketch/ok Missing FQBN (Fully Qualified Board Name) XXX@ arduino-cli % echo $? 1 XXX@ arduino-cli %
arduino-cli Version: git-snapshot Commit: 357d465 Date: 2023-01-03T09:30:23Z
macOS
11.6.5
No response
The text was updated successfully, but these errors were encountered:
This gets a +1 from me.
Sorry, something went wrong.
--library
Closed. Reason: #2221 (comment)
Closing as not planned.
alessio-perugini
Successfully merging a pull request may close this issue.
Describe the request
Please provide a broader range of exit codes. It's very often 1, making it hard to handle errors programmatically.
These are different kinds of programmer and user errors, but it takes time to figure them out because the exit code is the same:
Describe the current behavior
Arduino CLI version
arduino-cli Version: git-snapshot Commit: 357d465 Date: 2023-01-03T09:30:23Z
Operating system
macOS
Operating system version
11.6.5
Additional context
No response
Issue checklist
The text was updated successfully, but these errors were encountered: