dev-cmd/contributions: Use Utils.safe_popen_read not backticks
This commit is contained in:
parent
f6b2fe5093
commit
70c300daf2
@ -84,7 +84,7 @@ module Homebrew
|
|||||||
cmd += " --before=#{args[:to]}" if args[:to]
|
cmd += " --before=#{args[:to]}" if args[:to]
|
||||||
cmd += " --after=#{args[:from]}" if args[:from]
|
cmd += " --after=#{args[:from]}" if args[:from]
|
||||||
|
|
||||||
`#{cmd} | wc -l`.strip.to_i
|
Utils.safe_popen_read(cmd).lines.count
|
||||||
end
|
end
|
||||||
|
|
||||||
sig { params(repo_path: Pathname, args: Homebrew::CLI::Args).returns(Integer) }
|
sig { params(repo_path: Pathname, args: Homebrew::CLI::Args).returns(Integer) }
|
||||||
@ -95,6 +95,6 @@ module Homebrew
|
|||||||
cmd += " --after=#{args[:from]}" if args[:from]
|
cmd += " --after=#{args[:from]}" if args[:from]
|
||||||
cmd += " | grep #{args.named.first}"
|
cmd += " | grep #{args.named.first}"
|
||||||
|
|
||||||
`#{cmd} | wc -l`.strip.to_i
|
Utils.safe_popen_read(cmd).lines.count
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user