From 023af1a7d10a30ec3ccff572e93593fdb04dc280 Mon Sep 17 00:00:00 2001 From: gromgit Date: Mon, 30 Dec 2024 08:15:14 +0800 Subject: [PATCH 1/2] 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}" ]] From 91455e93463cddb4e0ad792e64deba969fbe715e Mon Sep 17 00:00:00 2001 From: Patrick Linnane Date: Sun, 29 Dec 2024 17:59:01 -0800 Subject: [PATCH 2/2] Update uninstall.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Misty De Méo --- uninstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uninstall.sh b/uninstall.sh index 1f94866f..44ff8d33 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -459,7 +459,7 @@ then fi fi -residual_dirs=("${HOMEREW_REPOSITORY}") +residual_dirs=("${HOMEBREW_REPOSITORY}") if [[ "${HOMEBREW_PREFIX}" != "/usr/local" ]] then residual_dirs+=("${HOMEBREW_PREFIX}")