replace capture2e with Utils.popen
This commit is contained in:
parent
732c6efa19
commit
e8f78878cb
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user