Merge pull request #14618 from Bo98/maximum-req-name-fix
formula: fix `to_hash` tampering with requirement names
This commit is contained in:
		
						commit
						8aa495b19b
					
				@ -2156,9 +2156,10 @@ class Formula
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    hsh["requirements"] = requirements.map do |req|
 | 
			
		||||
      req.name.prepend("maximum_") if req.try(:comparator) == "<="
 | 
			
		||||
      req_name = req.name.dup
 | 
			
		||||
      req_name.prepend("maximum_") if req.try(:comparator) == "<="
 | 
			
		||||
      {
 | 
			
		||||
        "name"     => req.name,
 | 
			
		||||
        "name"     => req_name,
 | 
			
		||||
        "cask"     => req.cask,
 | 
			
		||||
        "download" => req.download,
 | 
			
		||||
        "version"  => req.try(:version) || req.try(:arch),
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user