dwatteau / scummtr

Fan translation tools for SCUMM engine games
MIT License
23 stars 4 forks source link

Improper exit status when an exception happens #29

Open dwatteau opened 3 years ago

dwatteau commented 3 years ago

While trying to do this with ScummFont, in a directory where there was no CHAR_* files:

for file in CHAR_000? ; do
    scummfont o $file $file.bmp && scummfont i $file $file.bmp
done

this error happened:

ERROR: Cannot open font file
ERROR: Cannot open BMP file

The problem is that I used &&, so it should have stopped right after the first scummfont process. Looks like we're returning 0 even when an exception happens. That's quite dangerous for scripting…

Need to check all the tools for this behavior, and fix it.