aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2009-09-17 18:26:31 +0100
committerMax Howell2009-09-17 18:27:12 +0100
commit038e6ce6b7e6f34aa8c1fa45e1bc124f706ea0cc (patch)
treeb07a08ad61ae1cc3a7688eb45941a43a676765c9 /Library
parent08c67c47611ca0a018b398523ac2e942973334d3 (diff)
downloadhomebrew-038e6ce6b7e6f34aa8c1fa45e1bc124f706ea0cc.tar.bz2
Error out if a git command fails during update
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/refresh_brew.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/refresh_brew.rb b/Library/Homebrew/refresh_brew.rb
index fb906a44b..0f036d42a 100644
--- a/Library/Homebrew/refresh_brew.rb
+++ b/Library/Homebrew/refresh_brew.rb
@@ -38,10 +38,11 @@ class RefreshBrew
def execute(cmd)
out = `#{cmd}`
- if ARGV.verbose?
- ohai cmd
+ unless $?.success?
puts out
+ raise "Failed while executing #{cmd}"
end
+ ohai(cmd, out) if ARGV.verbose?
out
end