Skip to content
Snippets Groups Projects
Commit b309396b authored by Max Howell's avatar Max Howell
Browse files

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.
parent a32e738f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment