Command line version 1.5.4 return values - BUG

Also posted here Command Line return values with v1.5.4 - BUG? - Microcontrollers - Arduino Forum

259 rather than 0 returned for 'successful' invocation.

Also seems to return before the IDE has finished compiling/uploading.

Could it be made possible to redirect the output from the IDE so if it does fail there is some chance of looking at what has gone wrong?

I've been toying with the commandline options recently (and even suggested some improvements, see https://groups.google.com/a/arduino.cc/d/msg/developers/3WANmjH9Mwc/AS5Gsr3OuPoJ) but didn't see the problems you are mentioning.

Now, I've been using the git ide-1.5.x version, so perhaps the problem you found was already solved? I'm also running on Linux, so perhaps it's Windows-specific.

I think that there are nightly-builds based on the git versions available, perhaps you could try one of those? Not sure where those are, though (and no time to search right now).

I used the version I downloaded the day before so its pretty up to date.

I agree with your comments. At the moment its in need of more development to be useful in a batch file or home brewed tool such as I'm writing.

Do you mean you downloaded the nightly build? Since the topic subject says "1.5.4", which is the previous released version (which is already a few months old, I think).

Not the nightly build.

Will try it with 'fingers crossed' of course

Still faulty with nightly build.

Even so the design is wrong. Shouldn't return a code until the process has actually finished...

... and to ability to output the process text should be there

... the IDE window popping up is just irritating except it allows the user to do things.

matthijskooijman:
I've been toying with the commandline options recently (and even suggested some improvements, see https://groups.google.com/a/arduino.cc/d/msg/developers/3WANmjH9Mwc/AS5Gsr3OuPoJ) but didn't see the problems you are mentioning.

Now, I've been using the git ide-1.5.x version, so perhaps the problem you found was already solved? I'm also running on Linux, so perhaps it's Windows-specific.

I think that there are nightly-builds based on the git versions available, perhaps you could try one of those? Not sure where those are, though (and no time to search right now).

Tried the nightly and still faulty.

This feature doesn't seem to have been fully thought through. :frowning:

Then this might be something Windows-specific, since for me on Linux the process isn't returning until the compilation is complete (or failed) and the return code is correct. When I pass --verbose (or when I had the verbosity options already turned on before), I get the full compilation output in my console as well.

The IDE popping up is annoying, so I already have a patch to (very inelegantly, but effectively) fix that :slight_smile:

I'm on Windows 8.

I am testing inside a program that starts the command line and waits for completion and I'm also trying it in a command window (DOS prompt) with a batch file.

1.5.4r2 and the nightly build behave the same in the program.

In the command window the nightly build kills the command window somewhere during its processing whereas the 1.5.4r2 keeps it open. :frowning:

And when 1.5.4r2 runs in the the command window only a small amount of text is emitted which is barely useful.