commit
7853406fb4
@ -1337,10 +1337,14 @@ class Formula
|
||||
end
|
||||
end
|
||||
|
||||
# Clear caches of .racks and .installed.
|
||||
# @private
|
||||
def self.clear_cache
|
||||
# Clear cache of .racks
|
||||
def self.clear_racks_cache
|
||||
@racks = nil
|
||||
end
|
||||
|
||||
# Clear caches of .racks and .installed.
|
||||
def self.clear_installed_formulae_cache
|
||||
clear_racks_cache
|
||||
@installed = nil
|
||||
end
|
||||
|
||||
|
||||
@ -317,6 +317,10 @@ class Tab < OpenStruct
|
||||
end
|
||||
|
||||
def write
|
||||
# If this is a new installation, the cache of installed formulae
|
||||
# will no longer be valid.
|
||||
Formula.clear_installed_formulae_cache unless tabfile.exist?
|
||||
|
||||
CACHE[tabfile] = self
|
||||
tabfile.atomic_write(to_json)
|
||||
end
|
||||
|
||||
@ -327,7 +327,6 @@ class InstalledDependantsTests < LinkTests
|
||||
f = stub_formula_name(name)
|
||||
keg = super
|
||||
Tab.create(f, DevelopmentTools.default_compiler, :libcxx).write
|
||||
Formula.clear_cache
|
||||
keg
|
||||
end
|
||||
|
||||
|
||||
@ -34,13 +34,11 @@ class UninstallTests < Homebrew::TestCase
|
||||
end
|
||||
|
||||
def test_check_for_testball_f2s_when_developer
|
||||
skip "Flaky test"
|
||||
assert_match "Warning", handle_unsatisfied_dependents
|
||||
refute_predicate Homebrew, :failed?
|
||||
end
|
||||
|
||||
def test_check_for_dependents_when_not_developer
|
||||
skip "Flaky test"
|
||||
run_as_not_developer do
|
||||
assert_match "Error", handle_unsatisfied_dependents
|
||||
assert_predicate Homebrew, :failed?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user