Return non-zero error code on errors
Stupidly I figured Ruby did this for us, but why would it?
This commit is contained in:
parent
2668e2aeff
commit
a03d13088f
3
bin/brew
3
bin/brew
@ -204,8 +204,10 @@ begin
|
|||||||
rescue UsageError
|
rescue UsageError
|
||||||
onoe "Invalid usage"
|
onoe "Invalid usage"
|
||||||
puts ARGV.usage
|
puts ARGV.usage
|
||||||
|
exit 1
|
||||||
rescue SystemExit
|
rescue SystemExit
|
||||||
ohai "Kernel.exit" if ARGV.verbose?
|
ohai "Kernel.exit" if ARGV.verbose?
|
||||||
|
exit 1
|
||||||
rescue Interrupt => e
|
rescue Interrupt => e
|
||||||
# puts # seemingly a newline is typical
|
# puts # seemingly a newline is typical
|
||||||
# Above is now commented out because the system() call forks and then forks
|
# Above is now commented out because the system() call forks and then forks
|
||||||
@ -228,4 +230,5 @@ rescue Exception => e
|
|||||||
puts "Mac OS X: "+`sw_vers -productVersion`
|
puts "Mac OS X: "+`sw_vers -productVersion`
|
||||||
ohai e.inspect
|
ohai e.inspect
|
||||||
puts e.backtrace
|
puts e.backtrace
|
||||||
|
exit 1
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user