Skip to content

Commit

Permalink
fix: declare -i [SC2324 shellcheck] (#2624)
Browse files Browse the repository at this point in the history
Fix SC2324 shellcheck warning by adding -i to indicate var type of
integer and tidy up the formatting.
  • Loading branch information
Klaijan committed Mar 8, 2024
1 parent b27ad9b commit 30b6a09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/version-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ function usage {
}

function getopts-extra() {
declare i=1
declare -i i=1
# if the next argument is not an option, then append it to array OPTARG
while [[ ${OPTIND} -le $# && ${!OPTIND:0:1} != '-' ]]; do
OPTARG[i]=${!OPTIND}
i+=1
OPTIND+=1
((i += 1))
((OPTIND += 1))
done
}

Expand Down

0 comments on commit 30b6a09

Please sign in to comment.