aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-09-28 09:49:05 -0400
committerMax Howell2012-09-28 09:49:05 -0400
commitc61daa969cb7aff1b10667ae4a393bbe9af2b7d0 (patch)
treeb1ca8fe3b3c8e8164f9a0373832bd87ce65f1347 /Library
parent29ea04e12b9db99f2b0dd114d8a63a6f87179d28 (diff)
downloadhomebrew-c61daa969cb7aff1b10667ae4a393bbe9af2b7d0.tar.bz2
Safer way to redirect puts to a file
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/--config.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/--config.rb b/Library/Homebrew/cmd/--config.rb
index f72cbedff..1781d33a7 100644
--- a/Library/Homebrew/cmd/--config.rb
+++ b/Library/Homebrew/cmd/--config.rb
@@ -113,10 +113,11 @@ module Homebrew extend self
end
def write_build_config f
- $f = f
- def Homebrew.puts(*foo); $f.puts(*foo); end
+ stdout = $stdout
+ $stdout = f
Homebrew.dump_build_config
- class << Homebrew; undef :puts; end
+ ensure
+ $stdout = stdout
end
def dump_verbose_config