From 8b4f826c3c8f93d780a5fc052d4934ba51b1fdaa Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 21 May 2009 17:54:31 +0100 Subject: [PATCH] --debug mode Allows packager to salvage a failed build --- Cellar/homebrew/brewkit.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Cellar/homebrew/brewkit.rb b/Cellar/homebrew/brewkit.rb index 3c1df89d81..96c653767b 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