-
Notifications
You must be signed in to change notification settings - Fork 531
fix: treat 1.0 and 1 as the same for excel users #4543
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
Conversation
* fixes intel#4467 If you edit a csv/spreadsheet in excel, it will modify values that "look like" integers to it, so the version 1.0 becomes 1, truncating the final ".0" from the version string. This adds an edge case in to the version compare function so it treats these truncated versions as the same (which was the behaviour in previous versions of cve-bin-tool). Signed-off-by: Terri Oda <[email protected]>
@terriko is this where I'm supposed to get the new version of cve-bin-tool to test? |
@ tzirn Sorry, I didn't realize you'd have no idea how to test a branch! There's instructions if you search, but basically you clone my copy with the changes, then you'd run cve-bin-tool from that copy similar to how you'd do it from the main branch as we describe in the dev docs: https://github.com/intel/cve-bin-tool/blob/main/CONTRIBUTING.md#getting-and-maintaining-a-local-copy-of-the-source-code (Or build your own package following the tutorial at https://packaging.python.org/) But I"m guessing if that's not a thing you already knew, then it might be a bit much to sort out just to test a fix. Let me see if I can get this merged (we're having some CI issues at the moment) and I'll see about building a package. |
Okay, finally resolved the longtest issue and this is clearly passing. @anthonyharrison do you have time to do a code review? |
If you edit a csv/spreadsheet in excel, it will modify values that "look like" integers to it, so the version 1.0 becomes 1, truncating the final ".0" from the version string. This adds an edge case in to the version compare function so it treats these truncated versions as the same (which was the behaviour in previous versions of cve-bin-tool).