diff --git a/lib/tests/formulae.rb b/lib/tests/formulae.rb index 6165e905..41601777 100644 --- a/lib/tests/formulae.rb +++ b/lib/tests/formulae.rb @@ -242,7 +242,7 @@ def bottle_reinstall_formula(formula, new_formula, args:) # This is needed where sparse files may be handled (bsdtar >=3.0). # We use gnu-tar with sparse files disabled when --only-json-tab is passed. - ENV["HOMEBREW_BOTTLE_SUDO_PURGE"] = "1" if MacOS.version >= :catalina && !args.only_json_tab? + ENV["HOMEBREW_BOTTLE_SUDO_PURGE"] = "1" if OS.mac? && MacOS.version >= :catalina && !args.only_json_tab? bottle_args = ["--verbose", "--json", formula.full_name] bottle_args << "--keep-old" if args.keep_old? && !new_formula