-
-
Notifications
You must be signed in to change notification settings - Fork 7
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 IndexError
when there are no suggestions
#189
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good, just one small suggestion about the test.
Hmm, and the other |
This one prompts for $ eol bootstrap andro centos This one always halts at $ eol bootstrap julia centos |
Fixed in #190, let's update this branch. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #189 +/- ##
=======================================
Coverage 98.98% 98.98%
=======================================
Files 7 7
Lines 393 395 +2
=======================================
+ Hits 389 391 +2
Misses 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…rms are still handled Co-authored-by: Wu Tingfeng <[email protected]>
Ready for review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
IndexError
when there are no suggestions
When there are no suggestions returned by suggest_product() we get an IndexError from attempting to read the first element of an empty list.
I changed it such that if there are no suggestions, no [Y/n] option will be given; the prompt will only state that the search term is not found and exit immediately.
Before
After