Safer way to redirect puts to a file
This commit is contained in:
parent
7a75915345
commit
cddc3649a7
@ -113,10 +113,11 @@ module Homebrew extend self
|
|||||||
end
|
end
|
||||||
|
|
||||||
def write_build_config f
|
def write_build_config f
|
||||||
$f = f
|
stdout = $stdout
|
||||||
def Homebrew.puts(*foo); $f.puts(*foo); end
|
$stdout = f
|
||||||
Homebrew.dump_build_config
|
Homebrew.dump_build_config
|
||||||
class << Homebrew; undef :puts; end
|
ensure
|
||||||
|
$stdout = stdout
|
||||||
end
|
end
|
||||||
|
|
||||||
def dump_verbose_config
|
def dump_verbose_config
|
||||||
|
Loading…
x
Reference in New Issue
Block a user