From ca0639998a6dd477f3d758009e479d43ead30734 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Sat, 24 Aug 2024 08:54:01 +0800 Subject: [PATCH] utils/helpers.sh: remove a shellcheck disable I don't think we need this. --- Library/Homebrew/utils/helpers.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/utils/helpers.sh b/Library/Homebrew/utils/helpers.sh index 10388d6875cfb..bbc1cf70dc92f 100644 --- a/Library/Homebrew/utils/helpers.sh +++ b/Library/Homebrew/utils/helpers.sh @@ -82,7 +82,7 @@ which() { } numeric() { - # Condense the exploded argument into a single return value. - # shellcheck disable=SC2086,SC2183 - printf "%01d%02d%02d%03d" ${1//[.rc]/ } 2>/dev/null + local -a version_array + IFS=".rc" read -r -a version_array <<<"${1}" + printf "%01d%02d%02d%03d" "${version_array[@]}" 2>/dev/null }