]> source.dussan.org Git - redmine.git/commitdiff
Capture scm CLI stderr to log/scm.stderr.log when running in dev environment
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 12 Dec 2008 16:07:14 +0000 (16:07 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 12 Dec 2008 16:07:14 +0000 (16:07 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2128 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/abstract_adapter.rb

index 9f400880dc395b9e27cb06d4028e6055bc11cba4..7d21f8ebaaf4809b4c0a5350614ea1a2ffe8ab02 100644 (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