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

[Feature Request] Return error code to shell on error #25

Closed
epoweripione opened this issue Oct 15, 2020 · 3 comments · Fixed by #29
Closed

[Feature Request] Return error code to shell on error #25

epoweripione opened this issue Oct 15, 2020 · 3 comments · Fixed by #29
Labels
bug Something isn't working

Comments

@epoweripione
Copy link

I using pacaptr -Si xxx to search remote package information.
Sometimes the package doesn't exist, when using dnf info xxx will return an error level of non zero, but pacaptr -Si xxx always return 0.
I want to detect an errorlevel if there is an error like Error: No matching Packages to list.
Can this program return an error level of 0 if successful and non zero if a problem is encountered?
Thanks

@rami3l
Copy link
Owner

rami3l commented Oct 15, 2020

Hi @epoweripione, thanks for your feedback!

Actually, I myself want this feature as well, so I prepared a way of doing this in the current codebase. As a result, I should be able to fix this with a rather simple patch.

Unfortunately, I have other things to focus on right now, so please be patient, and I will have a look when I have free time to work on it. Stay tuned! :)

@epoweripione
Copy link
Author

Thanks! I am waiting for the release. :)

@rami3l rami3l added the bug Something isn't working label Oct 15, 2020
@rami3l rami3l mentioned this issue Oct 18, 2020
4 tasks
rami3l added a commit that referenced this issue Oct 19, 2020
@epoweripione
Copy link
Author

Great job! :)
This works perfectly now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants