aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorMax Howell2012-08-22 15:50:27 -0400
committerMax Howell2012-08-29 12:41:35 -0400
commitb1dc03861e37d110c3846653e0b2da1ffbab74c0 (patch)
tree5e9f0bdff1a0c391bc234abaf242a275f29efa6b /Library/Homebrew/utils.rb
parentf4f5994dc42023b1b0993fd24c9a1fe274f1c12d (diff)
downloadhomebrew-b1dc03861e37d110c3846653e0b2da1ffbab74c0.tar.bz2
Much better CTRL-C handling
Let's not show weird error messages when user interrupts during various stages of brew initialization. Tested by doing `for x in $(brew search); do brew install $x; done` and pressing CTRL-C at random short intervals.
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index b7158ae98..0970f99fe 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -217,7 +217,7 @@ def inreplace path, before=nil, after=nil
end
def ignore_interrupts
- std_trap = trap("INT") {}
+ std_trap = trap("INT") { puts "One sec, just cleaning up" }
yield
ensure
trap("INT", std_trap)