diff --git a/Library/Homebrew/dev-cmd/extract.rb b/Library/Homebrew/dev-cmd/extract.rb index af8e3b6375d8a..602725aa44bdc 100644 --- a/Library/Homebrew/dev-cmd/extract.rb +++ b/Library/Homebrew/dev-cmd/extract.rb @@ -133,7 +133,7 @@ def run result.sub!("class #{class_name} < Formula", "class #{versioned_name} < Formula") # Remove bottle blocks, as they won't work. - result.sub!(BOTTLE_BLOCK_REGEX, "") + result.sub!(BOTTLE_BLOCK_REGEX, "# The bottles might be available as oci images at docker://ghcr.io/homebrew/core/#{name}:#{version}") path = destination_tap.path/"Formula/#{name}@#{version_string}.rb" if path.exist? diff --git a/Library/Homebrew/test/dev-cmd/extract_spec.rb b/Library/Homebrew/test/dev-cmd/extract_spec.rb index f6e6104255a0b..7fbf98b9d2587 100644 --- a/Library/Homebrew/test/dev-cmd/extract_spec.rb +++ b/Library/Homebrew/test/dev-cmd/extract_spec.rb @@ -63,5 +63,15 @@ expect(path).to exist expect(Formulary.factory(path).version).to eq "0.2" end + + it "notes the url where bottles might be found", :integration_test do + path = target[:path]/"Formula/testball@0.2.rb" + expect { brew "extract", "testball", target[:name] } + .to output(/^#{path}$/).to_stdout + .and not_to_output.to_stderr + .and be_a_success + expect(path).to exist + expect(File.read(path)).to match(%r{docker://ghcr.io/homebrew/core/testball:0.2}) + end end end