We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 51d7cbd + b9f803d commit cfa2747Copy full SHA for cfa2747
1 file changed
lib/codacy/git.rb
@@ -14,7 +14,9 @@ def self.commit_id
14
end
15
16
def self.work_dir
17
- work_dir = ENV['WORK_DIR'] || git_dir
+ work_dir = ENV['WORK_DIR'] ||
18
+ ENV['TRAVIS_BUILD_DIR'] ||
19
+ git_dir
20
work_dir
21
22
@@ -23,7 +25,12 @@ def self.git_commit
23
25
24
26
27
def self.git_dir
- return `git rev-parse --show-toplevel`.strip!
28
+ dir = `git rev-parse --show-toplevel`
29
+ if $?.to_i == 0
30
+ return dir.strip!
31
+ else
32
+ return ''
33
+ end
34
35
36
def self.git(command)
0 commit comments