From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id D57F21F731 for ; Wed, 31 Jul 2019 19:57:08 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 2F63C120C40; Thu, 1 Aug 2019 04:57:00 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id B2D3C120A32 for ; Thu, 1 Aug 2019 04:56:57 +0900 (JST) Received: by filter0097p3iad2.sendgrid.net with SMTP id filter0097p3iad2-15416-5D41F28B-1C 2019-07-31 19:56:59.512268978 +0000 UTC m=+435167.478608561 Received: from herokuapp.com (unknown [54.152.150.139]) by ismtpd0045p1mdw1.sendgrid.net (SG) with ESMTP id 5S_OIQDYQ9W2aJQ6GaSyXQ for ; Wed, 31 Jul 2019 19:56:59.432 +0000 (UTC) Date: Wed, 31 Jul 2019 19:56:59 +0000 (UTC) From: merch-redmine@jeremyevans.net Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 69591 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 4436 X-Redmine-Issue-Author: jrdioko X-Redmine-Sender: jeremyevans0 X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?RVE3t853K5scBhbmJHUzZTFFeVC=2FZSUmHZ0Dc+26wcEi2CTgsF1oz0wTSSxGGN?= =?us-ascii?Q?BIcCMm6+euFwQHzCrFjEhGYMcSfnCuOuqJI9zdN?= =?us-ascii?Q?AeC8sqSO9Wp3gFGvqFxNjRtXnjdyk6kqlEeRRuo?= =?us-ascii?Q?rOvgPw7Sn18XE0mWD01rQteQ=2FniQEGO1jMnJHwN?= =?us-ascii?Q?r4phXILQddXvklY9E+AM0wftwhG4iEc3rJg=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 94084 Subject: [ruby-core:94084] [Ruby master Bug#4436] FileUtils verbose mode prints output to stderr X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "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/