From 023af1a7d10a30ec3ccff572e93593fdb04dc280 Mon Sep 17 00:00:00 2001 From: gromgit Date: Mon, 30 Dec 2024 08:15:14 +0800 Subject: [PATCH] uninstall.sh: don't check /usr/local for residual files It's a very common install prefix, so any residual files found here are likely false positives. Followup to #923. --- uninstall.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/uninstall.sh b/uninstall.sh index 414e1134..1f94866f 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -459,7 +459,12 @@ then fi fi -dir_children "${HOMEBREW_REPOSITORY}" "${HOMEBREW_PREFIX}" | +residual_dirs=("${HOMEREW_REPOSITORY}") +if [[ "${HOMEBREW_PREFIX}" != "/usr/local" ]] +then + residual_dirs+=("${HOMEBREW_PREFIX}") +fi +dir_children "${residual_dirs[@]}" | sort -u >"${tmpdir}/residual_files" if [[ -s "${tmpdir}/residual_files" && -z "${opt_quiet}" ]]