From c1d2f8a2c672ef889f32016c762a24c7d5ee3f16 Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Mon, 8 Nov 2021 22:50:20 +0800 Subject: [PATCH] style: catch failures while applying patches Co-authored-by: Mike McQuaid --- Library/Homebrew/style.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/style.rb b/Library/Homebrew/style.rb index 486e44cdd..9ed0cda22 100644 --- a/Library/Homebrew/style.rb +++ b/Library/Homebrew/style.rb @@ -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