diff options
| author | Mike McQuaid | 2012-04-14 17:17:16 +1000 |
|---|---|---|
| committer | Mike McQuaid | 2012-04-14 17:48:34 +1000 |
| commit | d4f757718505b080ef3bd60fbf9ab7a751453e9a (patch) | |
| tree | 85474ae82cb52faedefc5401d4af21fe15563d02 | |
| parent | 5d84df02107fe6cafbc7d20b9c8ce0c3c0298be4 (diff) | |
| download | brew-d4f757718505b080ef3bd60fbf9ab7a751453e9a.tar.bz2 | |
Add ofail command to print error and exit.
| -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 ;) |
