aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2014-10-27 13:16:18 +0000
committerMike McQuaid2014-10-27 13:16:18 +0000
commit92e68049d1e09757d498021426a650dfc6405cc3 (patch)
tree7778539bba3b7aa8c125410904bb38d70417c912
parent27c1a67ed63b2fcf0ba350f7d27449033e414551 (diff)
downloadbrew-92e68049d1e09757d498021426a650dfc6405cc3.tar.bz2
formula_installer: set exit code to failed always.
If we say something failed we should communicate that through the exit code for the bot and scripts.
-rw-r--r--Library/Homebrew/formula_installer.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 5df17c829..4da17b1c1 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -524,6 +524,7 @@ class FormulaInstaller
onoe "Failed to create #{f.opt_prefix}"
puts "Things that depend on #{f.name} will probably not build."
puts e
+ Homebrew.failed = true
end
return
end
@@ -544,6 +545,7 @@ class FormulaInstaller
mode = OpenStruct.new(:dry_run => true, :overwrite => true)
keg.link(mode)
@show_summary_heading = true
+ Homebrew.failed = true
rescue Keg::LinkError => e
onoe "The `brew link` step did not complete successfully"
puts "The formula built, but is not symlinked into #{HOMEBREW_PREFIX}"
@@ -552,6 +554,7 @@ class FormulaInstaller
puts "You can try again using:"
puts " brew link #{f.name}"
@show_summary_heading = true
+ Homebrew.failed = true
rescue Exception => e
onoe "An unexpected error occurred during the `brew link` step"
puts "The formula built, but is not symlinked into #{HOMEBREW_PREFIX}"
@@ -559,6 +562,7 @@ class FormulaInstaller
puts e.backtrace if debug?
@show_summary_heading = true
ignore_interrupts { keg.unlink }
+ Homebrew.failed = true
raise
end
end
@@ -570,6 +574,7 @@ class FormulaInstaller
rescue Exception => e
onoe "Failed to install plist file"
ohai e, e.backtrace if debug?
+ Homebrew.failed = true
end
def fix_install_names(keg)
@@ -584,6 +589,7 @@ class FormulaInstaller
puts "The formula built, but you may encounter issues using it or linking other"
puts "formula against it."
ohai e, e.backtrace if debug?
+ Homebrew.failed = true
@show_summary_heading = true
end
@@ -594,6 +600,7 @@ class FormulaInstaller
opoo "The cleaning step did not complete successfully"
puts "Still, the installation was successful, so we will link it into your prefix"
ohai e, e.backtrace if debug?
+ Homebrew.failed = true
@show_summary_heading = true
end
@@ -603,6 +610,7 @@ class FormulaInstaller
opoo "The post-install step did not complete successfully"
puts "You can try again using `brew postinstall #{f.name}`"
ohai e, e.backtrace if debug?
+ Homebrew.failed = true
@show_summary_heading = true
end