style: use popen_write to apply patches
This commit is contained in:
parent
a56ab26e88
commit
67c619d4f2
@ -181,8 +181,9 @@ module Homebrew
|
||||
]
|
||||
|
||||
if fix
|
||||
patch = system_command shellcheck, args: ["--format=diff", *args]
|
||||
system_command "patch", args: ["-d", "/", "-p0"], input: patch.stdout
|
||||
patches = system_command(shellcheck, args: ["--format=diff", *args]).stdout
|
||||
patch_command = %w[patch -g 0 -f -d / -p0]
|
||||
Utils.popen_write(*patch_command) { |p| p.write(patches) }
|
||||
end
|
||||
|
||||
case output_type
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user