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
This commit is contained in:
Jean-Philippe Lang 2008-12-12 16:07:14 +00:00
parent 740ec7656f
commit a37f4b9cf6
1 changed files with 4 additions and 0 deletions

View File

@ -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