Yaribz / SPADS

SpringRTS Perl Autohost for Dedicated Server
GNU General Public License v3.0
17 stars 16 forks source link

Return zero error code when spads failed #63

Closed p2004a closed 1 year ago

p2004a commented 1 year ago

When spads fails to connect to the lobby,

Jul 31 18:56:59 87a826e59173 spads_cluster_launcher.sh[12043]: 20230731185659 - ERROR    - [SPADS] Login denied on lobby server (Invalid password)

the spads exits, but returns code 0, which means success. What I expect it return a non-zero exit status when it exits because of error.

Yaribz commented 1 year ago

SPADS currently returns non-zero exit code when the failure is due to SPADS itself or its configuration (for example if a library cannot be loaded, or if the configuration is invalid...). When the lobby server says the password is invalid, SPADS itself is actually working correctly and its configuration is syntactically correct, so it's a different level of error. I will see what I can do to return exit code 2 in such case...

Yaribz commented 1 year ago

Actually I revamped SPADS exit code management in SPADS 0.13.13, the exit codes can be found here. For example the exit code in case of login denied is now 50.

p2004a commented 1 year ago

Great! Thanks a lot!