From 13a26d55170e5e50245b7462d55ab94871880453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Kryger?= Date: Wed, 23 Oct 2024 16:26:14 +0100 Subject: [PATCH] Use patch arguments directly Co-authored-by: Mike McQuaid --- Library/Homebrew/patch.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Library/Homebrew/patch.rb b/Library/Homebrew/patch.rb index 0894262ac8..510f4e0f9a 100644 --- a/Library/Homebrew/patch.rb +++ b/Library/Homebrew/patch.rb @@ -140,8 +140,7 @@ class ExternalPatch patch_files.each do |patch_file| ohai "Applying #{patch_file}" patch_file = patch_dir/patch_file - args = %W[-g 0 -f -#{strip}] - Utils.safe_popen_write("patch", *args) do |p| + Utils.safe_popen_write("patch", "-g", "0", "-f", "-#{strip}") do |p| File.foreach(patch_file) do |line| data = line.gsub("HOMEBREW_PREFIX", HOMEBREW_PREFIX) p.write(data)