Skip to content
New issue

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

CLI: upload returns 0 on failure with third party package #4127

Open
marvinroger opened this issue Nov 10, 2015 · 1 comment
Open

CLI: upload returns 0 on failure with third party package #4127

marvinroger opened this issue Nov 10, 2015 · 1 comment
Labels
Component: CLI The Arduino IDE's command line interface Component: Uploading Uploading programs to an Arduino board Type: Bug

Comments

@marvinroger
Copy link

I have a strange problem. I am using the Arduino CLI tu build a sketch. With an official board, calling arduino --upload --board arduino:avr:uno --port /dev/ttyUSB0 sketch.ino; echo $? does return 1 when the upload failed, and 0 when it worked.

But with a third party package (ESP8266), the above command with esp8266com:esp8266:nodemcuv2 always return 0, even on failure.

Digging in the code, I found out that the command exits with code 1 when success is false, which should be the case when the exit code of the upload command is different that 0. But the fact is the upload command from the ESP8266 package, which uses esptool, exits with a non-0 (255) value when the upload fails (I just tested manually). Still, arduino --upload exits with 0.

I really don't understand what is happening...

@marvinroger
Copy link
Author

Just tried to change the exit code of esptool on failure from 255 to a more standard one, 1. It doesn't change anything.

@per1234 per1234 added the Component: CLI The Arduino IDE's command line interface label Jul 4, 2017
@per1234 per1234 added Component: Uploading Uploading programs to an Arduino board Type: Bug labels Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: CLI The Arduino IDE's command line interface Component: Uploading Uploading programs to an Arduino board Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants