Skip to content

Commit

Permalink
fix: correct comparison in version check
Browse files Browse the repository at this point in the history
  • Loading branch information
LangLangBart committed Mar 17, 2024
1 parent dcc5b37 commit 2293e54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gh-find-code
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ check_version() {
IFS='.' read -ra threshold_parts <<<"$threshold"

for i in "${!threshold_parts[@]}"; do
if ((i >= ${#ver_parts[@]})) || (("${ver_parts[i]}" < "${threshold_parts[i]}")); then
if ((i >= ${#ver_parts[@]})) || ((ver_parts[i] < threshold_parts[i])); then
$on_error "Your '$tool' version '$user_version' is insufficient. The minimum required version is '$threshold'."
elif (("${ver_parts[i]}" > "${threshold_parts[i]}")); then
elif ((ver_parts[i] > threshold_parts[i])); then
break
fi
done
Expand Down

0 comments on commit 2293e54

Please sign in to comment.