aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-05-21 17:54:31 +0100
committerMax Howell2009-05-21 17:54:31 +0100
commit8b4f826c3c8f93d780a5fc052d4934ba51b1fdaa (patch)
treeff3099b07f58b81c1898e0924cef4675066bbf40
parentb659838993a4bb6441abfeea7023b9cc42f6129c (diff)
downloadbrew-8b4f826c3c8f93d780a5fc052d4934ba51b1fdaa.tar.bz2
--debug mode
Allows packager to salvage a failed build
-rw-r--r--Cellar/homebrew/brewkit.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/Cellar/homebrew/brewkit.rb b/Cellar/homebrew/brewkit.rb
index 3c1df89d8..96c653767 100644
--- a/Cellar/homebrew/brewkit.rb
+++ b/Cellar/homebrew/brewkit.rb
@@ -81,6 +81,15 @@ class Formula
#TODO maybe README, etc. to versioned root
end
end
+ rescue
+ if ARGV.include? '--debug'
+ # debug mode allows the packager to intercept a failed build and
+ # investigate the problems
+ puts "Rescued build at: #{tmp}"
+ exit! 1
+ else
+ raise
+ end
ensure
FileUtils.rm_rf tmp
end