diff --git a/Library/Homebrew/postinstall.rb b/Library/Homebrew/postinstall.rb index 0eb610839d..d35e3b886c 100644 --- a/Library/Homebrew/postinstall.rb +++ b/Library/Homebrew/postinstall.rb @@ -7,17 +7,10 @@ require "debrew" require "fcntl" require "socket" require "cli/parser" - -def postinstall_args - Homebrew::CLI::Parser.new do - switch :force - switch :verbose - switch :debug - end -end +require "cmd/postinstall" begin - postinstall_args.parse + Homebrew.postinstall_args.parse error_pipe = UNIXSocket.open(ENV["HOMEBREW_ERROR_PIPE"], &:recv_io) error_pipe.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) diff --git a/Library/Homebrew/test.rb b/Library/Homebrew/test.rb index c4b6403e86..095905ba67 100644 --- a/Library/Homebrew/test.rb +++ b/Library/Homebrew/test.rb @@ -10,19 +10,12 @@ require "formula_assertions" require "fcntl" require "socket" require "cli/parser" - -def test_args - Homebrew::CLI::Parser.new do - switch :force - switch :verbose - switch :debug - end -end +require "dev-cmd/test" TEST_TIMEOUT_SECONDS = 5 * 60 begin - test_args.parse + Homebrew.test_args.parse error_pipe = UNIXSocket.open(ENV["HOMEBREW_ERROR_PIPE"], &:recv_io) error_pipe.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)