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

Error message isn't very informative: aura >>= Please check your input. #639

Closed
ratijas opened this issue Oct 3, 2020 · 4 comments · Fixed by #653
Closed

Error message isn't very informative: aura >>= Please check your input. #639

ratijas opened this issue Oct 3, 2020 · 4 comments · Fixed by #653

Comments

@ratijas
Copy link
Contributor

ratijas commented Oct 3, 2020

When your search (-Ss) does not yield any results, aura prints this message and exists with status 1:

% aura -Ss objdump; echo $?
aura >>= Please check your input.
1

When I first saw this error message, I thought I made a typo in flags or something. It most certainly tells nothing about the search itself —only my input. Input what? Like, have done something wrong? Do I have to read man aura's page all over again? Well, you get the idea: such error message is inappropriate and not actionable.

Interestingly enough, this does not happen when searching AUR (-As):

aura -As objdump; echo $?
0

Expected behavior

Do nothing, say nothing, return 0. Or at least, say something meaningful.

Actual behavior

Prints [confusing] error message when nothing found in repositories (-Ss) for the given search terms.

Alternatives

For example, pacaur -Ss abcdefghi prints nothing and exits with code 0.

@fosskers
Copy link
Owner

fosskers commented Oct 5, 2020

I know the spot in the code that is causing this to happen, and can fix this. In general it is caused by an error code floating up from one of the (many) pacman calls that Aura makes. In this case it's just making one for an -Ss, so you're right that the message we're seeing here is totally inappropriate.

@ratijas
Copy link
Contributor Author

ratijas commented Oct 20, 2020

One more case of hilariously inappropriate "Please check your input" message:

% sudo aura -Suy
aura >>= Saved package state.
:: Synchronizing package databases...
 core is up to date
...

Total Download Size:    ... MiB
Total Installed Size:   ... MiB
Net Upgrade Size:       ... MiB

:: Proceed with installation? [Y/n] n
aura >>= Please check your input.
% echo $?
1

Alternatives

After hearing "No", pacaur proceeds to fetching AUR updates, and displays similar prompt but only for AUR packages. At this point, if user declines again, pacaur immediately exits with code 0. I say "immediately" because it does not even require to confirm your choice by pressing <Enter> — it may not be ideal, but that's how it works.

Pacman itself, however, exits with code 1 if denied to proceed: sudo pacman -Suy.

@fosskers
Copy link
Owner

fosskers commented Oct 22, 2020

In these cases I'm going to match pacman with the exit code. Note that pacman -Ss arstoiaesn also yields 1.

So I'll keep the exit codes, but silence the message.

@fosskers fosskers linked a pull request Oct 22, 2020 that will close this issue
@fosskers
Copy link
Owner

Thanks for reporting this, I'm glad to finally be rid of that spurious message.

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 a pull request may close this issue.

2 participants