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)
|
def execute(cmd)
|
||||||
out = `#{cmd}`
|
out = `#{cmd}`
|
||||||
if ARGV.verbose?
|
unless $?.success?
|
||||||
ohai cmd
|
|
||||||
puts out
|
puts out
|
||||||
|
raise "Failed while executing #{cmd}"
|
||||||
end
|
end
|
||||||
|
ohai(cmd, out) if ARGV.verbose?
|
||||||
out
|
out
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user