diff --git a/Library/Homebrew/dev-cmd/create.rb b/Library/Homebrew/dev-cmd/create.rb index 7b1f87ca6b..ad73d5b4ee 100644 --- a/Library/Homebrew/dev-cmd/create.rb +++ b/Library/Homebrew/dev-cmd/create.rb @@ -220,6 +220,7 @@ module Homebrew path = fc.write_formula! formula = Homebrew.with_no_api_env do + CoreTap.instance.clear_cache Formula[fc.name] end PyPI.update_python_resources! formula, ignore_non_pypi_packages: true if args.python? diff --git a/Library/Homebrew/formula_creator.rb b/Library/Homebrew/formula_creator.rb index 4c60c468c6..7aea843537 100644 --- a/Library/Homebrew/formula_creator.rb +++ b/Library/Homebrew/formula_creator.rb @@ -100,9 +100,9 @@ module Homebrew sig { params(name: String).returns(String) } def latest_versioned_formula(name) name_prefix = "#{name}@" - Tap.fetch("homebrew/core").formula_names - .select { |f| f.start_with?(name_prefix) } - .max_by { |v| Gem::Version.new(v.sub(name_prefix, "")) } || "python" + CoreTap.instance.formula_names + .select { |f| f.start_with?(name_prefix) } + .max_by { |v| Gem::Version.new(v.sub(name_prefix, "")) } || "python" end sig { returns(String) }