--debug mode

Allows packager to salvage a failed build
This commit is contained in:
Max Howell 2009-05-21 17:54:31 +01:00
parent b659838993
commit 8b4f826c3c

View File

@ -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