Merge pull request #11005 from MikeMcQuaid/github_packages_bottle_tab_clear_cache
Fix `brew fetch --force` for GitHub Packages bottle tab download.
This commit is contained in:
		
						commit
						f266acff2d
					
				@ -88,6 +88,7 @@ module Homebrew
 | 
			
		||||
        fetched_bottle = false
 | 
			
		||||
        if fetch_bottle?(f, args: args)
 | 
			
		||||
          begin
 | 
			
		||||
            f.clear_cache if args.force?
 | 
			
		||||
            f.fetch_bottle_tab
 | 
			
		||||
            fetch_formula(f.bottle, args: args)
 | 
			
		||||
          rescue Interrupt
 | 
			
		||||
 | 
			
		||||
@ -293,7 +293,7 @@ class Bottle
 | 
			
		||||
  attr_reader :name, :resource, :prefix, :cellar, :rebuild
 | 
			
		||||
 | 
			
		||||
  def_delegators :resource, :url, :verify_download_integrity
 | 
			
		||||
  def_delegators :resource, :cached_download, :clear_cache
 | 
			
		||||
  def_delegators :resource, :cached_download
 | 
			
		||||
 | 
			
		||||
  def initialize(formula, spec)
 | 
			
		||||
    @name = formula.name
 | 
			
		||||
@ -335,6 +335,11 @@ class Bottle
 | 
			
		||||
    @resource.fetch(verify_download_integrity: verify_download_integrity)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def clear_cache
 | 
			
		||||
    @resource.clear_cache
 | 
			
		||||
    github_packages_manifest_resource&.clear_cache
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def compatible_locations?
 | 
			
		||||
    @spec.compatible_locations?
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user