| 
									
										
										
										
											2020-11-25 17:03:23 +01:00
										 |  |  | # typed: true | 
					
						
							| 
									
										
										
										
											2019-04-19 15:38:03 +09:00
										 |  |  | # frozen_string_literal: true | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-04-13 18:16:27 +08:00
										 |  |  | require "sandbox" | 
					
						
							| 
									
										
										
										
											2018-05-12 13:52:40 +02:00
										 |  |  | require "formula_installer" | 
					
						
							| 
									
										
										
										
											2019-04-17 18:25:08 +09:00
										 |  |  | require "cli/parser" | 
					
						
							| 
									
										
										
										
											2015-04-13 18:16:27 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-18 22:41:47 -05:00
										 |  |  | module Homebrew | 
					
						
							| 
									
										
										
										
											2020-10-20 12:03:48 +02:00
										 |  |  |   extend T::Sig | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-26 01:44:51 +02:00
										 |  |  |   module_function | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-20 12:03:48 +02:00
										 |  |  |   sig { returns(CLI::Parser) } | 
					
						
							| 
									
										
										
										
											2018-11-11 20:17:33 +05:30
										 |  |  |   def postinstall_args | 
					
						
							|  |  |  |     Homebrew::CLI::Parser.new do | 
					
						
							| 
									
										
										
										
											2021-01-15 15:04:02 -05:00
										 |  |  |       description <<~EOS | 
					
						
							| 
									
										
										
										
											2018-11-11 20:17:33 +05:30
										 |  |  |         Rerun the post-install steps for <formula>. | 
					
						
							|  |  |  |       EOS | 
					
						
							| 
									
										
										
										
											2020-07-30 18:40:10 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-10 14:26:40 -05:00
										 |  |  |       named_args :installed_formula, min: 1
 | 
					
						
							| 
									
										
										
										
											2018-11-11 20:17:33 +05:30
										 |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-09-01 13:56:35 +01:00
										 |  |  |   def postinstall | 
					
						
							| 
									
										
										
										
											2020-07-25 03:48:33 +02:00
										 |  |  |     args = postinstall_args.parse | 
					
						
							| 
									
										
										
										
											2018-11-11 20:17:33 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-19 10:34:48 -04:00
										 |  |  |     args.named.to_resolved_formulae.each do |f| | 
					
						
							| 
									
										
										
										
											2017-05-03 09:00:17 +01:00
										 |  |  |       ohai "Postinstalling #{f}" | 
					
						
							| 
									
										
										
										
											2020-11-18 05:37:12 +01:00
										 |  |  |       fi = FormulaInstaller.new(f, **{ debug: args.debug?, quiet: args.quiet?, verbose: args.verbose? }.compact) | 
					
						
							| 
									
										
										
										
											2018-05-12 13:52:40 +02:00
										 |  |  |       fi.post_install | 
					
						
							| 
									
										
										
										
											2015-04-13 18:16:27 +08:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2013-09-01 13:56:35 +01:00
										 |  |  |   end | 
					
						
							|  |  |  | end |