Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit f67cf54

Browse files
author
dancostalis
committed
Merge remote-tracking branch 'upstream/master'
Conflicts: lib/code_climate/test_reporter/git.rb
2 parents 35b484d + f31c043 commit f67cf54

File tree

1 file changed

+8
-1
lines changed
  • lib/code_climate/test_reporter

1 file changed

+8
-1
lines changed

lib/code_climate/test_reporter/git.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,14 @@ def git(command)
5050

5151
def git_dir
5252
return CodeClimate::TestReporter.configuration.git_dir unless CodeClimate::TestReporter.configuration.git_dir.nil?
53-
defined?(Rails) ? Rails.root : '.'
53+
54+
root = "."
55+
56+
if defined?(Rails) && File.directory?(File.expand_path(".git", Rails.root))
57+
root = Rails.root
58+
end
59+
60+
root
5461
end
5562
end
5663
end

0 commit comments

Comments
 (0)