aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-09-05 15:22:51 -0500
committerJack Nagel2014-09-05 15:23:00 -0500
commit8e66c4d42a45b3ea9adf8a291b1adf24b74b9259 (patch)
tree34175e4b75e5fcf6b51cf885cd701866ba4408ca /Library
parent51ead3dd9faa20454a995ec88ba1a3bd29498d2d (diff)
downloadhomebrew-8e66c4d42a45b3ea9adf8a291b1adf24b74b9259.tar.bz2
Ensure log file is closed
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/tree.rb1
-rw-r--r--Library/Homebrew/formula.rb2
2 files changed, 3 insertions, 0 deletions
diff --git a/Library/Formula/tree.rb b/Library/Formula/tree.rb
index a75024d3a..02d1c48aa 100644
--- a/Library/Formula/tree.rb
+++ b/Library/Formula/tree.rb
@@ -24,6 +24,7 @@ class Tree < Formula
"LDFLAGS=#{ENV.ldflags}",
"OBJS=#{objs}",
"install"
+ system "ls", "/dev/fd"
end
test do
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 9782fffa2..3f09b14e3 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -546,6 +546,8 @@ class Formula
Homebrew.dump_build_config(log)
raise BuildError.new(self, cmd, args)
end
+ ensure
+ log.close if log && !log.closed?
end
private