Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postinstall: Use CLI::Parser to parse args #5309

Merged
merged 1 commit into from
Nov 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions Library/Homebrew/cmd/postinstall.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,27 @@

require "sandbox"
require "formula_installer"
require "cli_parser"

module Homebrew
module_function

def postinstall_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`postinstall` <formula>

Rerun the post-install steps for <formula>.
EOS
switch :verbose
switch :force
switch :debug
end
end

def postinstall
postinstall_args.parse

ARGV.resolved_formulae.each do |f|
ohai "Postinstalling #{f}"
fi = FormulaInstaller.new(f)
Expand Down