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

Command-line exit codes #83

Closed
11xx opened this issue May 21, 2022 · 3 comments
Closed

Command-line exit codes #83

11xx opened this issue May 21, 2022 · 3 comments

Comments

@11xx
Copy link

11xx commented May 21, 2022

Hi,

The command-line errors don't seem to return exit codes other than 0.

This shell syntax don't work:

tageditor extract cover -f "file" -o out.jpg || echo "Error"

I'm using this in a script and the only way to execute commands on
the case tageditor errors out is to grep for specific strings.

Also the error strings go to stout rather than sterr.

Thank you.

@Martchus
Copy link
Owner

Note that there will be generally a non-zero exit code in case there's an error, e.g. if invalid CLI args have been specified. I make the error case "None of the specified files has a (supported) cover field." and similar error cases return a non-zero exit code that is different from the invalid args case.

Note that errors are already generally logged to stderr. The only exception are diagnostic messages (which can be warnings, errors but also just additional information). Maybe these should also be generally printed to stderr. Maybe the error message you want to be printed on stderr instead on stdout is just one of those diagnostic messages. To be sure, what error are you talking about exactly?

@Martchus
Copy link
Owner

Should be fixed on master.

@11xx
Copy link
Author

11xx commented May 21, 2022

Note that errors are already generally logged to stderr. The only exception are diagnostic messages

Got it. That's fine then.
It's working great now! Thank very much 👍

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

No branches or pull requests

2 participants