Skip to content

Commit

Permalink
fixup: simplify excluding of MacGPG2 folder
Browse files Browse the repository at this point in the history
  • Loading branch information
pheiduck authored Dec 29, 2024
1 parent 6a7c192 commit c2565b4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,6 @@ fi
for file in "${homebrew_files[@]}"
do

if [[ "${file}" == "/usr/local/MacGPG2/"* ]]
then
warn "Skipping protected directory: ${file}"
continue
fi

if [[ -n "${opt_dry_run}" ]]
then
echo "Would delete ${file}"
Expand Down Expand Up @@ -469,6 +463,8 @@ fi
dir_children "${HOMEBREW_REPOSITORY}" "${HOMEBREW_PREFIX}" |
sort -u >"${tmpdir}/residual_files"

grep -v "MacGPG2" "${tmpdir}/residual_files" > "${tmpdir}/filtered_residual_files"

if [[ -s "${tmpdir}/residual_files" && -z "${opt_quiet}" ]]
then
echo "The following possible Homebrew files were not deleted:"
Expand Down

0 comments on commit c2565b4

Please sign in to comment.