Skip to content

Commit

Permalink
Ensure semver gets parsed correctly (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
tapayne88 authored Jun 11, 2022
1 parent a74d3a6 commit bb1bbd2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/utils/semver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ semver::compare() {
return 0
fi

local IFS="."
local i
local version_1="$1"
local version_2="$2"
local version_1
local version_2

IFS='.' read -r -a version_1 <<< "$1"
IFS='.' read -r -a version_2 <<< "$2"

# Fill empty fields in version_1 with zeros
for ((i=${#version_1[@]}; i<${#version_2[@]}; i++)); do
Expand Down

0 comments on commit bb1bbd2

Please sign in to comment.