diff options
| author | Mike McQuaid | 2012-04-14 17:17:16 +1000 |
|---|---|---|
| committer | Mike McQuaid | 2012-04-14 17:48:34 +1000 |
| commit | a1abd110844efb0cb4f7c872ecc2a642ffa5edf1 (patch) | |
| tree | 89ea46c88d50b69adcb81af8e80e516d5cfd12ad /Library/Homebrew | |
| parent | e399fd70a10a727a202078f8148ca0421a7e6044 (diff) | |
| download | homebrew-a1abd110844efb0cb4f7c872ecc2a642ffa5edf1.tar.bz2 | |
Add ofail command to print error and exit.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/utils.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 6e1db3005..77d9fe9ca 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -53,6 +53,10 @@ def onoe error puts lines unless lines.empty? end +def ofail error + onoe error + exit 1 +end def pretty_duration s return "2 seconds" if s < 3 # avoids the plural problem ;) |
