diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 85fd79cf70..cdfbd08ae3 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -810,6 +810,9 @@ EOS else echo "Failed to download ${json_url}!" >>"${update_failed_file}" fi + + # Not a typo, this is the file we used to download that we should cleanup. + rm -f "${HOMEBREW_CACHE}/api/${formula_or_cask}.json" done fi diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb index dd6e9e9f05..7e78b2ec28 100644 --- a/Library/Homebrew/system_config.rb +++ b/Library/Homebrew/system_config.rb @@ -147,7 +147,7 @@ module SystemConfig f.puts "Core tap branch: #{core_tap_branch}" end - if (formula_json = Homebrew::API::HOMEBREW_CACHE_API/"formula.json") && formula_json.exist? + if (formula_json = Homebrew::API::HOMEBREW_CACHE_API/"formula.jws.json") && formula_json.exist? f.puts "Core tap JSON: #{formula_json.mtime.utc.strftime("%d %b %H:%M UTC")}" elsif !CoreTap.instance.installed? f.puts "Core tap: N/A" diff --git a/docs/Formula-Cookbook.md b/docs/Formula-Cookbook.md index 3dd44bc57d..94e7dbf88e 100644 --- a/docs/Formula-Cookbook.md +++ b/docs/Formula-Cookbook.md @@ -23,7 +23,7 @@ A *formula* is a package definition written in Ruby. It can be created with `bre Homebrew uses Git for storing formulae and contributing to the project. -As-of [Homebrew 4.0.0](https://brew.sh/2023/02/16/homebrew-4.0.0/), formulae are downloaded from `https://formulae.brew.sh/api/formula.json`, which is automatically regenerated by a scheduled formulae.brew.sh job from the `master` branch of the homebrew-core repository. +As-of [Homebrew 4.0.0](https://brew.sh/2023/02/16/homebrew-4.0.0/), formulae are downloaded from JSON in which is automatically regenerated by a scheduled formulae.brew.sh job from the `master` branch of the homebrew-core repository. Homebrew installs formulae to the Cellar at `$(brew --cellar)` and then symlinks some of the installation into the prefix at `$(brew --prefix)` (e.g. `/opt/homebrew`) so that other programs can see what's going on. We suggest running `brew ls` on a few of the kegs in your Cellar to see how it is all arranged.