aglio icon indicating copy to clipboard operation
aglio copied to clipboard

CLI: exit process with correct error code

Open aledeg opened this issue 8 years ago • 3 comments

I've seen that there is already a resolved ticket (#38) about that issue. But it seems that when I have warnings during the generation, the return code is 0.

Here is the launched command:

aglio --theme flatly --theme-template index.jade --theme-full-width true -i book.apib -o book.html

Am I missing something?

aledeg avatar Oct 14 '16 14:10 aledeg

If I redirect stderr to a file, I get all errors and warnings in that file. That means that there is an unconsitency between the output and the exit code. As a workaround, I output every error and warning messages to a file and test the file.

aledeg avatar Oct 18 '16 07:10 aledeg

A warning message isn't an error, though? So it shouldn't affect the exit code? A non-zero exit code would be considered an error.

jackbentley avatar Mar 03 '17 22:03 jackbentley

I agree that a warning is not an error, but there should be something to differentiate a process that works flawlessly and one with warnings. Maybe a switch to convert warnings to errors.

aledeg avatar Mar 06 '17 10:03 aledeg