Pass args in postinstall instead of using global args.
This commit is contained in:
parent
3a60d50bd3
commit
8d52fa909f
@ -10,13 +10,13 @@ require "cli/parser"
|
|||||||
require "cmd/postinstall"
|
require "cmd/postinstall"
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Homebrew.postinstall_args.parse
|
args = Homebrew.postinstall_args.parse
|
||||||
error_pipe = UNIXSocket.open(ENV["HOMEBREW_ERROR_PIPE"], &:recv_io)
|
error_pipe = UNIXSocket.open(ENV["HOMEBREW_ERROR_PIPE"], &:recv_io)
|
||||||
error_pipe.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
|
error_pipe.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
|
||||||
|
|
||||||
trap("INT", old_trap)
|
trap("INT", old_trap)
|
||||||
|
|
||||||
formula = Homebrew.args.resolved_formulae.first
|
formula = args.resolved_formulae.first
|
||||||
formula.extend(Debrew::Formula) if Homebrew.args.debug?
|
formula.extend(Debrew::Formula) if Homebrew.args.debug?
|
||||||
formula.run_post_install
|
formula.run_post_install
|
||||||
rescue Exception => e # rubocop:disable Lint/RescueException
|
rescue Exception => e # rubocop:disable Lint/RescueException
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user