Add better Unix exit codes.

Closes Homebrew/homebrew#10809.
This commit is contained in:
Mike McQuaid 2012-03-08 00:10:34 -08:00
parent a005834d7a
commit 5f1a9098c9
3 changed files with 4 additions and 0 deletions

View File

@ -836,5 +836,6 @@ module Homebrew extend self
end end
puts "Your system is raring to brew." if raring_to_brew puts "Your system is raring to brew." if raring_to_brew
exit raring_to_brew ? 0 : 1
end end
end end

View File

@ -87,6 +87,7 @@ module Homebrew extend self
fi.finish fi.finish
rescue CannotInstallFormulaError => e rescue CannotInstallFormulaError => e
onoe e.message onoe e.message
exit 1
end end
end end
end end

View File

@ -66,9 +66,11 @@ module Homebrew extend self
installer.finish installer.finish
rescue CannotInstallFormulaError => e rescue CannotInstallFormulaError => e
onoe e onoe e
exit 1
rescue BuildError => e rescue BuildError => e
e.dump e.dump
puts puts
exit 1
ensure ensure
# restore previous installation state if build failed # restore previous installation state if build failed
outdated_keg.link if outdated_keg and not f.installed? rescue nil outdated_keg.link if outdated_keg and not f.installed? rescue nil