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

appimageupdatetool --check-for-update returns 1 for missing files #237

Open
JnCrMx opened this issue Oct 30, 2024 · 0 comments
Open

appimageupdatetool --check-for-update returns 1 for missing files #237

JnCrMx opened this issue Oct 30, 2024 · 0 comments

Comments

@JnCrMx
Copy link

JnCrMx commented Oct 30, 2024

If I run appimageupdatetool -j file-that-does-not-exist it returns the exit code 1 indicating that an update is available. The same happens if no positional argument at all gets passed to the program.

Looking at src/cli/main.cpp this happens because the file argument is checked before the mode of operation is considered.

However, this creates a contradiction with the help text "Exits with code 1 if changes are available, 0 if there are not,other non-zero code in case of errors" and makes using appimageupdatetool within scripts or other programs very annoying, since it is impossible to tell if the program exited with code 1 because the file is not available (or the argument missing if I simple use $APPIMAGE) or because an update is really available.

It would be very helpful and more robust to have completely distinct exit codes, so either a different exit code for the cases of a missing argument/missing file or a different exit code to indicate that an update is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant