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

Fix: Hash detection affects all Search results #107

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mrxiaozhuox
Copy link

Description

The current Hash check in the code will directly cause the program to throw an error. When using Search, if there is even one Hash check failure, no information can be displayed.

I have fixed this issue and retained the error throw in the Install section. However, I don't think it's necessary to make the program fail to run specifically because of this issue.

The possible useful solutions I have thought of, which I can modify if you are willing to accept, are:

  1. Automatically ignore all packages with Hash check failures.
  2. Give users the right to choose, informing them that the content does not match, but they can still install it.

@mrxiaozhuox
Copy link
Author

It seems that directly adding a dirty field in the pkgs is not a good idea, so we can only wrap a layer of status or directly filter out the data that failed the hash verification.

@mrxiaozhuox
Copy link
Author

or add a new flag to decide how to control hash check failed.

@mrxiaozhuox
Copy link
Author

mrxiaozhuox commented Nov 21, 2024

I pushed a new update to fix the issue without affecting the structure.

  • for nupm search: hidden hash check failed package.
  • for nupm install: throw hash check failed error.

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.

1 participant