Merge pull request #11594 from carlocab/formula-logs

formula: capture build logs more comprehensively
This commit is contained in:
Carlo Cabrera 2021-06-25 13:21:18 -07:00 committed by GitHub
commit e571055b82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1269,7 +1269,18 @@ class Formula
staging.retain! if interactive || debug?
raise
ensure
cp Dir["config.log", "CMakeCache.txt"], logs
%w[
config.log
CMakeCache.txt
CMakeOutput.log
CMakeError.log
].each do |logfile|
Dir["**/#{logfile}"].each do |logpath|
destdir = logs/File.dirname(logpath)
mkdir_p destdir
cp logpath, destdir
end
end
end
end
ensure