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