Skip to content

Commit

Permalink
uninstall.sh: don't check /usr/local for residual files
Browse files Browse the repository at this point in the history
It's a very common install prefix, so any residual files found here are likely false positives.

Followup to #923.
  • Loading branch information
gromgit committed Dec 30, 2024
1 parent a7705fd commit 023af1a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}" ]]
Expand Down

0 comments on commit 023af1a

Please sign in to comment.