Fix brew fetch --force for GitHub Packages bottle tab download.
				
					
				
			Have to implement some custom logic here as there's two resources rather than one.
This commit is contained in:
		
							parent
							
								
									a7d253a8a7
								
							
						
					
					
						commit
						262f964f9e
					
				@ -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