style: catch failures while applying patches

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Xuehai Pan
2021-11-08 22:50:20 +08:00
committed by GitHub
co-authored by Mike McQuaid
parent b86fdfeb09
commit c1d2f8a2c6
+1 -1
View File
@@ -188,7 +188,7 @@ module Homebrew
# --strip=0 : do not strip path prefixes, since we are at root directory
patch_command = %w[patch --get=0 --force --directory=/ --strip=0]
patches = system_command(shellcheck, args: ["--format=diff", *args]).stdout
Utils.popen_write(*patch_command) { |p| p.write(patches) }
Utils.safe_popen_write(*patch_command) { |p| p.write(patches) }
end
case output_type