Formula: add any_version_installed? method
This commit is contained in:
		
							parent
							
								
									8f5f27358a
								
							
						
					
					
						commit
						03facd8554
					
				@ -274,6 +274,12 @@ class Formula
 | 
				
			|||||||
    (dir = installed_prefix).directory? && dir.children.length > 0
 | 
					    (dir = installed_prefix).directory? && dir.children.length > 0
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # If at least one version of {Formula} is installed.
 | 
				
			||||||
 | 
					  def any_version_installed?
 | 
				
			||||||
 | 
					    require "tab"
 | 
				
			||||||
 | 
					    rack.directory? && rack.subdirs.any? { |keg| (keg/Tab::FILENAME).file? }
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # @private
 | 
					  # @private
 | 
				
			||||||
  # The `LinkedKegs` directory for this {Formula}.
 | 
					  # The `LinkedKegs` directory for this {Formula}.
 | 
				
			||||||
  # You probably want {#opt_prefix} instead.
 | 
					  # You probably want {#opt_prefix} instead.
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user