From 26467fa9d7219b816fd87fb53af20e9d4c39d21b Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 27 Aug 2014 17:25:13 -0500 Subject: [PATCH] Make sure all exceptions are sent back to the parent process --- Library/Homebrew/build.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index 29252ea993..c7211f0321 100644 --- a/Library/Homebrew/build.rb +++ b/Library/Homebrew/build.rb @@ -176,15 +176,15 @@ class Build end end -error_pipe = IO.new(ENV["HOMEBREW_ERROR_PIPE"].to_i, "w") -error_pipe.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) - -# Invalidate the current sudo timestamp in case a build script calls sudo -system "/usr/bin/sudo", "-k" - -trap("INT", old_trap) - begin + error_pipe = IO.new(ENV["HOMEBREW_ERROR_PIPE"].to_i, "w") + error_pipe.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) + + # Invalidate the current sudo timestamp in case a build script calls sudo + system "/usr/bin/sudo", "-k" + + trap("INT", old_trap) + formula = ARGV.formulae.first options = Options.create(ARGV.options_only) build = Build.new(formula, options)