From 75b1e681b8dbfa6d39fd5571557ca20f368eb203 Mon Sep 17 00:00:00 2001 From: chirsz Date: Mon, 28 Jul 2025 18:53:10 +0000 Subject: [PATCH] cmd/update: use short option in update.sh Support the environment not supporting long option, such as Alpine Linux with busybox. --- Library/Homebrew/cmd/update.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 483df50370..bce429f812 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -211,9 +211,8 @@ merge_or_rebase() { if [[ "${DIR}" == "${HOMEBREW_REPOSITORY}" && -n "${HOMEBREW_UPDATE_TO_TAG}" ]] then UPSTREAM_TAG="$( - git tag --list | - sort --field-separator=. --key=1,1nr -k 2,2nr -k 3,3nr | - grep --max-count=1 '^[0-9]*\.[0-9]*\.[0-9]*$' + git tag --list --sort=-version:refname | + grep -m 1 '^[0-9]*\.[0-9]*\.[0-9]*$' )" else UPSTREAM_TAG=""