Skip to content

Commit

Permalink
Use patch arguments directly
Browse files Browse the repository at this point in the history
Co-authored-by: Mike McQuaid <[email protected]>
  • Loading branch information
pkryger and MikeMcQuaid authored Oct 23, 2024
1 parent a03d65b commit 13a26d5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Library/Homebrew/patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ def apply
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)
Expand Down

0 comments on commit 13a26d5

Please sign in to comment.