mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Error out if a git command fails during update
This commit is contained in:
parent
7ebd012128
commit
cb28a0f477
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user