Skip to content

Commit 086c239

Browse files
committed
Improve config.log capture: search recursively and list directory contents
1 parent dde2442 commit 086c239

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

packaging/homebrew/mfc.rb

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,22 @@ def install
8181
"python_cmd=#{venv}/bin/python",
8282
"-j#{ENV.make_jobs}"
8383
# If scons failed, try to output config.log for debugging
84-
if File.exist?("config.log")
85-
ohai "Cantera config.log (for debugging):"
86-
puts File.read("config.log")
84+
ohai "Cantera scons failed. Searching for config.log..."
85+
ohai "Current directory: #{Dir.pwd}"
86+
system "ls", "-la"
87+
88+
# Search for config.log in current directory and subdirectories
89+
config_logs = Dir.glob("**/config.log")
90+
if config_logs.any?
91+
config_logs.each do |log_path|
92+
ohai "Found config.log at: #{log_path}"
93+
puts File.read(log_path)
94+
end
95+
else
96+
ohai "No config.log found. Listing all files:"
97+
system "find", ".", "-type", "f", "-name", "*.log"
8798
end
99+
88100
raise "Cantera scons build failed"
89101
end
90102

0 commit comments

Comments
 (0)