| 
									
										
										
										
											2016-10-10 13:41:27 +01:00
										 |  |  | #:  * `missing` [`--hide=`<hidden>] [<formulae>]: | 
					
						
							| 
									
										
										
										
											2016-08-17 01:19:40 +02:00
										 |  |  | #:    Check the given <formulae> for missing dependencies. If no <formulae> are | 
					
						
							|  |  |  | #:    given, check all installed brews. | 
					
						
							| 
									
										
										
										
											2016-10-10 13:41:27 +01:00
										 |  |  | #: | 
					
						
							|  |  |  | #:    If `--hide=`<hidden> is passed, act as if none of <hidden> are installed. | 
					
						
							| 
									
										
										
										
											2016-10-30 16:30:40 +00:00
										 |  |  | #:    <hidden> should be a comma-separated list of formulae. | 
					
						
							| 
									
										
										
										
											2016-04-08 16:28:43 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-03 13:09:07 +01:00
										 |  |  | require "formula" | 
					
						
							|  |  |  | require "tab" | 
					
						
							| 
									
										
										
										
											2016-01-04 23:14:58 +01:00
										 |  |  | require "diagnostic" | 
					
						
							| 
									
										
										
										
											2012-06-11 12:57:51 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-18 22:41:47 -05:00
										 |  |  | module Homebrew | 
					
						
							| 
									
										
										
										
											2016-09-26 01:44:51 +02:00
										 |  |  |   module_function | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-06-11 12:57:51 -07:00
										 |  |  |   def missing | 
					
						
							|  |  |  |     return unless HOMEBREW_CELLAR.exist? | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-14 11:57:10 -05:00
										 |  |  |     ff = if ARGV.named.empty? | 
					
						
							| 
									
										
										
										
											2017-10-14 06:18:09 +01:00
										 |  |  |       Formula.installed.sort | 
					
						
							| 
									
										
										
										
											2012-06-11 12:57:51 -07:00
										 |  |  |     else | 
					
						
							| 
									
										
										
										
											2017-10-14 06:18:09 +01:00
										 |  |  |       ARGV.resolved_formulae.sort | 
					
						
							| 
									
										
										
										
											2012-06-11 12:57:51 -07:00
										 |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-05 21:14:43 +01:00
										 |  |  |     ff.each do |f| | 
					
						
							| 
									
										
										
										
											2016-10-10 13:26:09 +01:00
										 |  |  |       missing = f.missing_dependencies(hide: ARGV.values("hide")) | 
					
						
							| 
									
										
										
										
											2016-10-05 21:14:43 +01:00
										 |  |  |       next if missing.empty? | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       print "#{f}: " if ff.size > 1
 | 
					
						
							| 
									
										
										
										
											2016-10-22 13:32:46 +01:00
										 |  |  |       puts missing.join(" ") | 
					
						
							| 
									
										
										
										
											2012-06-11 12:57:51 -07:00
										 |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |