From 70c300daf240c90c52071ef222b54e444d07056a Mon Sep 17 00:00:00 2001 From: Issy Long Date: Mon, 25 Jul 2022 10:43:55 +0100 Subject: [PATCH] dev-cmd/contributions: Use `Utils.safe_popen_read` not backticks --- Library/Homebrew/dev-cmd/contributions.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/dev-cmd/contributions.rb b/Library/Homebrew/dev-cmd/contributions.rb index 9a7960e117..dbf336b966 100755 --- a/Library/Homebrew/dev-cmd/contributions.rb +++ b/Library/Homebrew/dev-cmd/contributions.rb @@ -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