 0f9bad0052
			
		
	
	
		0f9bad0052
		
			
		
	
	
	
	
		
			
			We were previously only looking at the `cellar` value when pouring bottles and ignoring the `prefix` and (implicit) `repository`. Actually look at these values and set the defaults for each platform. Also, when we're relocating to create or pour bottles when `prefix` and `repository` are equal then skip relocating the `repository` and always use references to the `prefix` instead. Fixes #9453
		
			
				
	
	
		
			22 lines
		
	
	
		
			499 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			499 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| # typed: true
 | |
| # frozen_string_literal: true
 | |
| 
 | |
| module Homebrew
 | |
|   # @api private
 | |
|   module Fetch
 | |
|     extend T::Sig
 | |
| 
 | |
|     sig { params(f: Formula, args: CLI::Args).returns(T::Boolean) }
 | |
|     def fetch_bottle?(f, args:)
 | |
|       bottle = f.bottle
 | |
| 
 | |
|       return true if args.force_bottle? && bottle
 | |
|       return false unless bottle && f.pour_bottle?
 | |
|       return false if args.build_from_source_formulae.include?(f.full_name)
 | |
|       return false unless bottle.compatible_locations?
 | |
| 
 | |
|       true
 | |
|     end
 | |
|   end
 | |
| end
 |