From aea107b55adf6a8ae0ad3e632b76576a65adfd80 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Tue, 11 May 2021 02:31:27 +0100 Subject: [PATCH] system_command: fix rare scenario of interrupt being reported to stderr --- Library/Homebrew/system_command.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library/Homebrew/system_command.rb b/Library/Homebrew/system_command.rb index eba9bd607e..ddce9d8113 100644 --- a/Library/Homebrew/system_command.rb +++ b/Library/Homebrew/system_command.rb @@ -204,6 +204,8 @@ class SystemCommand Thread.handle_interrupt(ProcessTerminatedInterrupt => :never) do each_line_from [raw_stdout, raw_stderr], &block end + # Handle race conditions with interrupts + Thread.current.report_on_exception = false rescue ProcessTerminatedInterrupt nil end