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 += " --after=#{args[:from]}" if args[:from]
|
||||
|
||||
`#{cmd} | wc -l`.strip.to_i
|
||||
Utils.safe_popen_read(cmd).lines.count
|
||||
end
|
||||
|
||||
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 += " | grep #{args.named.first}"
|
||||
|
||||
`#{cmd} | wc -l`.strip.to_i
|
||||
Utils.safe_popen_read(cmd).lines.count
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user