@@ -744,7 +744,7 @@ def homebrew
744744 end
745745 end
746746
747- def cleanup_git
747+ def cleanup_shared
748748 git "gc" , "--auto"
749749 test "git" , "clean" , "-ffdx" , "--exclude=Library/Taps"
750750
@@ -754,8 +754,8 @@ def cleanup_git
754754 safe_system "brew" , "untap" , tap
755755 end
756756
757- Formula . installed . each do |formula |
758- safe_system "brew" , "uninstall" , "--force" , formula
757+ Dir . glob ( " #{ HOMEBREW_PREFIX } /{Cellar,etc,var}/**/*" ) . each do |file |
758+ FileUtils . rm_rf file
759759 end
760760 safe_system "brew" , "prune"
761761
@@ -787,7 +787,7 @@ def cleanup_before
787787 git "reset" , "--hard" , "origin/master"
788788 end
789789
790- cleanup_git
790+ cleanup_shared
791791
792792 pr_locks = "#{ @repository } /.git/refs/remotes/*/pr/*/*.lock"
793793 Dir . glob ( pr_locks ) { |lock | FileUtils . rm_rf lock }
@@ -808,7 +808,7 @@ def cleanup_after
808808 git "stash" , "pop"
809809 test "brew" , "cleanup" , "--prune=7"
810810
811- cleanup_git
811+ cleanup_shared
812812
813813 if ARGV . include? "--local"
814814 FileUtils . rm_rf ENV [ "HOMEBREW_HOME" ]
0 commit comments