config.rb 554 Bytes
Newer Older
Markus Reiter's avatar
Markus Reiter committed
1
# typed: true
2
3
# frozen_string_literal: true

4
require "system_config"
5
require "cli/parser"
6

7
module Homebrew
Markus Reiter's avatar
Markus Reiter committed
8
9
  extend T::Sig

10
11
  module_function

Markus Reiter's avatar
Markus Reiter committed
12
  sig { returns(CLI::Parser) }
13
14
15
16
17
  def config_args
    Homebrew::CLI::Parser.new do
      usage_banner <<~EOS
        `config`

18
19
        Show Homebrew and system configuration info useful for debugging. If you file
        a bug report, you will be required to provide this information.
20
      EOS
Markus Reiter's avatar
Markus Reiter committed
21

22
      max_named 0
23
24
25
    end
  end

Adam Vandenberg's avatar
Adam Vandenberg committed
26
  def config
27
    config_args.parse
28

29
    SystemConfig.dump_verbose_config
30
31
  end
end