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

Wrong exit status is returned when uploading using the command line interface #4255

Open
dpisani opened this issue Dec 5, 2015 · 1 comment
Labels
Component: Uploading Uploading programs to an Arduino board Type: Bug

Comments

@dpisani
Copy link

dpisani commented Dec 5, 2015

When upload fails using the CLI it often returns with exit status 0 instead of an error code. I am using version 1.6.6 on Linux.

For example, if I try to upload to a device that doesn't exist:

arduino --board arduino:avr:uno --port /dev/NO_SUCH_DEVICE --upload ~/Arduino/blink/blink.ino

The exit status is 0 even though the console output will show that the upload fails:

Picked up JAVA_TOOL_OPTIONS: 
Loading configuration...
Initializing packages...
Preparing boards...
Verifying and uploading...

Sketch uses 1,030 bytes (3%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
avrdude: ser_open(): can't open device "/dev/BAD_DEVICE": No such file or directory
ioctl("TIOCMGET"): Inappropriate ioctl for device

If I run the command multiple times it will sometimes return with exit code 1 and add the following line of output:

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
@ffissore ffissore added Type: Bug Component: Uploading Uploading programs to an Arduino board labels Dec 7, 2015
@per1234
Copy link
Collaborator

per1234 commented Jul 4, 2017

Maybe related to #4127?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Uploading Uploading programs to an Arduino board Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants