From be5d14dc28095b02fe3e72d8d110c323c00ebd74 Mon Sep 17 00:00:00 2001 From: chirsz Date: Tue, 29 Jul 2025 02:42:56 +0800 Subject: [PATCH] install.sh: improve POSIX compatibility POSIX `find` do not support `-lname`: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/find.html --- uninstall.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uninstall.sh b/uninstall.sh index c2747193..12dffcfa 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -385,7 +385,9 @@ do done if [[ "${#paths[@]}" -gt 0 ]] then - args=("${paths[@]}" -type l -lname '*/Cellar/*') + # We want expand in subcommand, not here + # shellcheck disable=SC2016 + args=("${paths[@]}" -type l -exec /bin/sh -c 'case $(ls -l "$1") in *-\>\ */Cellar/*)exit;esac;exit 1' _ {} \;) if [[ -n "${opt_dry_run}" ]] then args+=(-print)