mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
29 lines
569 B
Ruby
29 lines
569 B
Ruby
# typed: strict
|
|
# frozen_string_literal: true
|
|
|
|
require "abstract_command"
|
|
require "commands"
|
|
|
|
module Homebrew
|
|
module DevCmd
|
|
class Command < AbstractCommand
|
|
cmd_args do
|
|
description <<~EOS
|
|
Display the path to the file being used when invoking `brew` <cmd>.
|
|
EOS
|
|
|
|
named_args :command, min: 1
|
|
end
|
|
|
|
sig { override.void }
|
|
def run
|
|
args.named.each do |cmd|
|
|
path = Commands.path(cmd)
|
|
odie "Unknown command: #{cmd}" unless path
|
|
puts path
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|