diff options
| author | Max Howell | 2012-08-22 15:50:27 -0400 |
|---|---|---|
| committer | Max Howell | 2012-08-29 12:41:35 -0400 |
| commit | 20ce16a3ffd6485177121422734be0b7bba5c591 (patch) | |
| tree | 9c384aef15c87bcbbb5901e03e59450585c7c894 /Library/Homebrew/utils.rb | |
| parent | fb8c7e0aafdd487533cce6853fe845346d97c87c (diff) | |
| download | brew-20ce16a3ffd6485177121422734be0b7bba5c591.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.rb | 2 |
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) |
