aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/build.rb
diff options
context:
space:
mode:
authorJack Nagel2014-08-27 17:25:13 -0500
committerJack Nagel2014-08-27 17:25:13 -0500
commit26467fa9d7219b816fd87fb53af20e9d4c39d21b (patch)
tree9dfac6fdebe3672dbae9c9d104ec53c1525269d8 /Library/Homebrew/build.rb
parent9386902cf8c1e3311337b36615ee5e2c4ec9edf4 (diff)
downloadbrew-26467fa9d7219b816fd87fb53af20e9d4c39d21b.tar.bz2
Make sure all exceptions are sent back to the parent process
Diffstat (limited to 'Library/Homebrew/build.rb')
-rw-r--r--Library/Homebrew/build.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index 29252ea99..c7211f032 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)
+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"
+ # Invalidate the current sudo timestamp in case a build script calls sudo
+ system "/usr/bin/sudo", "-k"
-trap("INT", old_trap)
+ trap("INT", old_trap)
-begin
formula = ARGV.formulae.first
options = Options.create(ARGV.options_only)
build = Build.new(formula, options)