ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:93790] [Ruby master Bug#4436] FileUtils verbose mode prints output to stderr
       [not found] <redmine.issue-4436.20110224041930@ruby-lang.org>
@ 2019-07-15 16:43 ` merch-redmine
  2019-07-31 19:56 ` [ruby-core:94084] " merch-redmine
  1 sibling, 0 replies; 2+ messages in thread
From: merch-redmine @ 2019-07-15 16:43 UTC (permalink / raw
  To: ruby-core

Issue #4436 has been updated by jeremyevans0 (Jeremy Evans).

Backport set to 2.5: UNKNOWN, 2.6: UNKNOWN
ruby -v deleted (1.8.7)
Description updated
Subject changed from FileUtils#cp_r verbose mode prints output to stderr to FileUtils verbose mode prints output to stderr
Project changed from Ruby 1.8 to Ruby master

This was set to the Ruby 1.8 tracker, but I think it is still an issue currently for all FileUtils methods.  Changing the default behavior could possibly be done in Ruby 3, and potentially we could add an option for `$stdout` (or another IO stream) for non-error messages in 2.7.

----------------------------------------
Bug #4436: FileUtils verbose mode prints output to stderr
https://bugs.ruby-lang.org/issues/4436#change-79539

* Author: jrdioko (Johnathan Ritzi)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
=begin
I'm using a plugin in a Ruby on Rails application that uses FileUtils's cp_r method to copy files into place (with verbose mode on). When deploying my application with Capistrano, I get several "error" lines during this part (http://groups.google.com/group/capistrano/browse_thread/thread/64e95a26af3035cd?pli=1).

It appears that FileUtils#cp_r prints all output in verbose mode to stderr, even if the output is not erroneous (http://stackoverflow.com/questions/3163585/getting-executed-command-from-ruby-fileutils). It seems that fu_output_message (and related code) should be changed so that output goes to stdout and errors go to stderr, as usual.
=end




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ruby-core:94084] [Ruby master Bug#4436] FileUtils verbose mode prints output to stderr
       [not found] <redmine.issue-4436.20110224041930@ruby-lang.org>
  2019-07-15 16:43 ` [ruby-core:93790] [Ruby master Bug#4436] FileUtils verbose mode prints output to stderr merch-redmine
@ 2019-07-31 19:56 ` merch-redmine
  1 sibling, 0 replies; 2+ messages in thread
From: merch-redmine @ 2019-07-31 19:56 UTC (permalink / raw
  To: ruby-core

Issue #4436 has been updated by jeremyevans0 (Jeremy Evans).

Target version set to Next Major

After a more thorough review, `fu_output_message` is only called in verbose mode. You can get the behavior you want via:

```ruby
FileUtils.instance_variable_set(:@fileutils_output, $stdout)
```

before calling other methods on FileUtils.  I think changing the default from `$stderr` to `$stdout` should be done in Ruby 3.

----------------------------------------
Bug #4436: FileUtils verbose mode prints output to stderr
https://bugs.ruby-lang.org/issues/4436#change-80315

* Author: jrdioko (Johnathan Ritzi)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: Next Major
* ruby -v: 
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
=begin
I'm using a plugin in a Ruby on Rails application that uses FileUtils's cp_r method to copy files into place (with verbose mode on). When deploying my application with Capistrano, I get several "error" lines during this part (http://groups.google.com/group/capistrano/browse_thread/thread/64e95a26af3035cd?pli=1).

It appears that FileUtils#cp_r prints all output in verbose mode to stderr, even if the output is not erroneous (http://stackoverflow.com/questions/3163585/getting-executed-command-from-ruby-fileutils). It seems that fu_output_message (and related code) should be changed so that output goes to stdout and errors go to stderr, as usual.
=end




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-31 19:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-4436.20110224041930@ruby-lang.org>
2019-07-15 16:43 ` [ruby-core:93790] [Ruby master Bug#4436] FileUtils verbose mode prints output to stderr merch-redmine
2019-07-31 19:56 ` [ruby-core:94084] " merch-redmine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).