From: Jean-Philippe Lang Date: Fri, 12 Dec 2008 16:07:14 +0000 (+0000) Subject: Capture scm CLI stderr to log/scm.stderr.log when running in dev environment X-Git-Tag: 0.9.0~879 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a37f4b9cf6991f5cde39d908e2549b1242b04859;p=redmine.git 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 --- 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