diff --git a/Library/Homebrew/utils/livecheck.rb b/Library/Homebrew/utils/livecheck.rb index 045006553a..914880e13c 100644 --- a/Library/Homebrew/utils/livecheck.rb +++ b/Library/Homebrew/utils/livecheck.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require "open3" - module Livecheck - def livecheck_formula_response(formula_name) - ohai "Checking livecheck formula : #{formula_name}" - command_args = ["brew", "livecheck", formula_name, "--quiet"] + def livecheck_formula_response(name) + ohai "Checking livecheck formula : #{name}" - response = Open3.capture2e(*command_args) + response = Utils.popen_read("brew", "livecheck", name, "--quiet").chomp parse_livecheck_response(response) end diff --git a/Library/Homebrew/utils/versions.rb b/Library/Homebrew/utils/versions.rb index 1cacdd30b6..de5de6d239 100644 --- a/Library/Homebrew/utils/versions.rb +++ b/Library/Homebrew/utils/versions.rb @@ -1,6 +1,5 @@ # frozen_string_literal: true -require "open3" require "formula" module Versions @@ -9,10 +8,9 @@ module Versions end def bump_formula_pr(formula_name, url) - command_args = ["brew", "bump-formula-pr", "--no-browse", - "--dry-run", formula_name, "--url=#{url}"] + response = Utils.popen_read("brew", "bump-formula-pr", "--no-browse", + "--dry-run", formula_name, "--url=#{url}").chomp - response = Open3.capture2e(*command_args) parse_formula_bump_response(response) end