From a37f4b9cf6991f5cde39d908e2549b1242b04859 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 12 Dec 2008 16:07:14 +0000 Subject: [PATCH] Capture scm CLI stderr to log/scm.stderr.log when running in dev environment git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2128 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/abstract_adapter.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb index 9f400880d..7d21f8eba 100644 --- a/lib/redmine/scm/adapters/abstract_adapter.rb +++ b/lib/redmine/scm/adapters/abstract_adapter.rb @@ -171,6 +171,10 @@ module Redmine def self.shellout(cmd, &block) logger.debug "Shelling out: #{cmd}" if logger && logger.debug? + if Rails.env == 'development' + # Capture stderr when running in dev environment + cmd = "#{cmd} 2>>#{RAILS_ROOT}/log/scm.stderr.log" + end begin IO.popen(cmd, "r+") do |io| io.close_write -- 2.39.5