| 
									
										
										
										
											2024-03-19 11:50:53 -07:00
										 |  |  | # typed: strict | 
					
						
							| 
									
										
										
										
											2019-04-19 15:38:03 +09:00
										 |  |  | # frozen_string_literal: true | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-19 11:50:53 -07:00
										 |  |  | require "abstract_command" | 
					
						
							| 
									
										
										
										
											2016-09-07 20:09:22 +01:00
										 |  |  | require "commands" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-26 15:19:27 +08:00
										 |  |  | module Homebrew | 
					
						
							| 
									
										
										
										
											2024-03-19 11:50:53 -07:00
										 |  |  |   module DevCmd | 
					
						
							|  |  |  |     class Command < AbstractCommand | 
					
						
							|  |  |  |       cmd_args do | 
					
						
							|  |  |  |         description <<~EOS | 
					
						
							|  |  |  |           Display the path to the file being used when invoking `brew` <cmd>. | 
					
						
							|  |  |  |         EOS | 
					
						
							| 
									
										
										
										
											2016-09-26 01:44:51 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-19 11:50:53 -07:00
										 |  |  |         named_args :command, min: 1
 | 
					
						
							|  |  |  |       end | 
					
						
							| 
									
										
										
										
											2020-07-30 18:40:10 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-19 11:50:53 -07:00
										 |  |  |       sig { override.void } | 
					
						
							|  |  |  |       def run | 
					
						
							|  |  |  |         args.named.each do |cmd| | 
					
						
							|  |  |  |           path = Commands.path(cmd) | 
					
						
							|  |  |  |           odie "Unknown command: #{cmd}" unless path | 
					
						
							|  |  |  |           puts path | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |       end | 
					
						
							| 
									
										
										
										
											2019-12-13 16:57:57 -05:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2015-06-26 15:19:27 +08:00
										 |  |  |   end | 
					
						
							|  |  |  | end |