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:
parent
740ec7656f
commit
a37f4b9cf6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue