fix: checking version was too strict #92
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In my system I have, for some reasons, a developer version of
fzf
:> fzf --version 0.29 (devel)
Although this version meets the minimum required version of 0.29.0 specified by
MIN_FZF_VERSION="0.29.0"
, thecheck_version
function incorrectly fails the check.This PR addresses the issue by modifying the check_version function. Specifically, the function now allows the version check to pass when the installed version has one fewer segment than the threshold version, provided that the missing segment in the threshold version is 0. For instance, if the threshold version is 0.29.0, then an installed version of 0.29 is considered sufficient, as the trailing 0 does not imply a higher version requirement.
Therefore my additional check
result in the case
tool=0.29
(2 parts) andthreshold=0.29.0
(3 parts) andi=2
in