diff options
| author | Max Howell | 2009-11-06 17:09:14 +0000 |
|---|---|---|
| committer | Max Howell | 2009-11-08 15:21:09 +0000 |
| commit | d4db223c714d0bd3e66c3767550dc55cdf478977 (patch) | |
| tree | ed2cbe608a02fcb03853a31da8aea4f8fca490d5 /Library/Homebrew/utils.rb | |
| parent | 6e74ee9f6bcb600ac836980875da7fea5fd684b9 (diff) | |
| download | homebrew-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.rb | 7 |
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 |
