Error out if a git command fails during update

This commit is contained in:
Max Howell 2009-09-17 18:26:31 +01:00
parent 7ebd012128
commit cb28a0f477

View File

@ -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