brew/Library/Homebrew/cmd/postinstall.rb

35 lines
638 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require "sandbox"
require "formula_installer"
2019-04-17 18:25:08 +09:00
require "cli/parser"
module Homebrew
2016-09-26 01:44:51 +02:00
module_function
def postinstall_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`postinstall` <formula>
Rerun the post-install steps for <formula>.
EOS
switch :force
switch :verbose
switch :debug
min_named :keg
end
end
def postinstall
args = postinstall_args.parse
args.resolved_formulae.each do |f|
ohai "Postinstalling #{f}"
fi = FormulaInstaller.new(f)
fi.force = args.force?
fi.post_install
end
end
end