aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorMax Howell2009-11-06 17:09:14 +0000
committerMax Howell2009-11-08 15:21:09 +0000
commitd4db223c714d0bd3e66c3767550dc55cdf478977 (patch)
treeed2cbe608a02fcb03853a31da8aea4f8fca490d5 /Library/Homebrew/utils.rb
parent6e74ee9f6bcb600ac836980875da7fea5fd684b9 (diff)
downloadhomebrew-d4db223c714d0bd3e66c3767550dc55cdf478977.tar.bz2
Use our own popen implementation in Formula.system
The rationale here is that the --verbose mode had a bug where it didn't escape its parameters properly. Which caused ocassionally cryptic issues.
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 0f94cce6e..e30512ff9 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -150,3 +150,10 @@ def inreplace path, before, after
f.reopen(path, 'w').write(o)
f.close
end
+
+def ignore_interrupts
+ std_trap = trap("INT") {}
+ yield
+ensure
+ trap("INT", std_trap)
+end