aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 0970f99fe..ff301bbcf 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -216,8 +216,10 @@ def inreplace path, before=nil, after=nil
end
end
-def ignore_interrupts
- std_trap = trap("INT") { puts "One sec, just cleaning up" }
+def ignore_interrupts(opt = nil)
+ std_trap = trap("INT") do
+ puts "One sec, just cleaning up" unless opt = :quietly
+ end
yield
ensure
trap("INT", std_trap)