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

sh: Use CLI::Parser to parse args

parent 70c5b6f8
No related branches found
No related tags found
No related merge requests found
......@@ -9,11 +9,31 @@
require "extend/ENV"
require "formula"
require "cli_parser"
module Homebrew
module_function
def sh_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`sh` [<options>]
Start a Homebrew build environment shell. Uses our years-battle-hardened
Homebrew build logic to help your `./configure && make && make install`
or even your `gem install` succeed. Especially handy if you run Homebrew
in an Xcode-only configuration since it adds tools like `make` to your `PATH`
which otherwise build systems would not find.
EOS
flag "--env=",
description: "Use the standard `PATH` instead of superenv's, when <std> is passed"
switch :verbose
switch :debug
end
end
def sh
sh_args.parse
ENV.activate_extensions!
if superenv?
......
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