Skip to content

Commit d98c687

Browse files
nobuhsbt
authored andcommitted
Revert "[ruby/fileutils] Make verbose output go to stdout instead of stderr"
This reverts commit 7cddb844e6d51f954c6669341b9cc656bd7d3492, because the test of rake 13.0.1 is depending on the previous behavior.
1 parent 0da851a commit d98c687

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/fileutils.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,7 @@ def fu_same?(a, b) #:nodoc:
16221622

16231623
def fu_output_message(msg) #:nodoc:
16241624
output = @fileutils_output if defined?(@fileutils_output)
1625-
output ||= $stdout
1625+
output ||= $stderr
16261626
if defined?(@fileutils_label)
16271627
msg = @fileutils_label + msg
16281628
end

test/fileutils/test_fileutils.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,16 +1743,16 @@ def test_chdir_verbose_frozen
17431743
o.extend(FileUtils)
17441744
o.singleton_class.send(:public, :chdir)
17451745
o.freeze
1746-
orig_stdout = $stdout
1747-
$stdout = StringIO.new
1746+
orig_stderr = $stderr
1747+
$stderr = StringIO.new
17481748
o.chdir('.', verbose: true){}
1749-
$stdout.rewind
1750-
assert_equal(<<-END, $stdout.read)
1749+
$stderr.rewind
1750+
assert_equal(<<-END, $stderr.read)
17511751
cd .
17521752
cd -
17531753
END
17541754
ensure
1755-
$stdout = orig_stdout if orig_stdout
1755+
$stderr = orig_stderr if orig_stderr
17561756
end
17571757

17581758
def test_getwd

0 commit comments

Comments
 (0)