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

chafa: Return TRUE (0) after print_version(). #7

Merged
merged 1 commit into from Aug 13, 2018

Conversation

cdluminate
Copy link
Collaborator

@cdluminate cdluminate commented Aug 13, 2018

I need a dry-run chafa command for Debian's autopkgtest infrastructure, which continuously checks whether a package is malfunctional. However currently chafa --help and chafa --version both return FALSE (1) such that autopkgtest would consider it as an error. This is a false-positive.

Taking gcc as an example

$ gcc ; echo $?
gcc: fatal error: no input files
compilation terminated.
1
$ gcc --version ; echo $?
gcc (Debian 8.1.0-9) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

0
$ gcc --help >/dev/null ; echo $?
0
$ 

We can see that gcc --version doesn't return a failure.

Similar to gcc, this patch makes chafa --version return 0.

@hpjansson
Copy link
Owner

Thanks, this is obviously correct. I'll fix the help case too in a separate commit.

@hpjansson hpjansson merged commit da01aa1 into hpjansson:master Aug 13, 2018
@cdluminate cdluminate deleted the print-ver-ret-0 branch August 13, 2018 12:15
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

Successfully merging this pull request may close these issues.

None yet

2 participants