diff options
| author | Max Howell | 2011-08-31 17:35:33 +0100 |
|---|---|---|
| committer | Max Howell | 2011-08-31 17:36:41 +0100 |
| commit | b309396b024536fe70c95f9a5bee4f2714255c29 (patch) | |
| tree | 8a586d285c21d99870cadf98f70b13742a6f3781 /Library | |
| parent | a32e738f7c77a45a42572ca9efc215d1fd1e1519 (diff) | |
| download | brew-b309396b024536fe70c95f9a5bee4f2714255c29.tar.bz2 | |
cp over CMakeLists.txt if cmake builds fail
The self help text does not mention the log, but we can add this later, and for now at least the file is salvaged.
Closes Homebrew/homebrew#5940.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 141164650..507c2e560 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -259,11 +259,14 @@ class Formula yield self rescue Interrupt, RuntimeError, SystemCallError => e unless ARGV.debug? + logs = File.expand_path '~/Library/Logs/Homebrew/' if File.exist? 'config.log' - logs = File.expand_path '~/Library/Logs/Homebrew/' mkdir_p logs - cp 'config.log', logs + mv 'config.log', logs end + if File.exist? 'CMakeLists.txt' + mkdir_p logs + mv 'CMakeLists.txt', logs raise end onoe e.inspect |
