Skip to content
Snippets Groups Projects
Unverified Commit 0eecbb21 authored by Gautham Goli's avatar Gautham Goli
Browse files

config: Use CLI::Parser to parse args

parent 70c5b6f8
No related branches found
No related tags found
No related merge requests found
......@@ -4,11 +4,28 @@
#: provide it.
require "system_config"
require "cli_parser"
module Homebrew
module_function
def config_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`config`
Show Homebrew and system configuration useful for debugging. If you file
a bug report, you will likely be asked for this information if you do not
provide it.
EOS
switch :verbose
switch :debug
end
end
def config
config_args.parse
raise UsageError unless args.remaining.empty?
SystemConfig.dump_verbose_config
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment