2024-03-29 18:53:07 -07:00

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