diff --git a/lib/test.rb b/lib/test.rb index 64690fad..33466600 100644 --- a/lib/test.rb +++ b/lib/test.rb @@ -489,6 +489,9 @@ def bottle_reinstall_formula(formula, new_formula) return if ARGV.include?("--no-bottle") return if formula.bottle_disabled? + if MacOS.version >= :catalina + ENV["HOMEBREW_BOTTLE_SUDO_PURGE"] = "1" + end root_url = ARGV.value("root-url") bottle_args = ["--verbose", "--json", formula.name] bottle_args << "--keep-old" if ARGV.include?("--keep-old") && !new_formula