File tree 1 file changed +8
-18
lines changed
src/ReportGenerator.Core/Parser/FileReading
1 file changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -33,28 +33,18 @@ static LocalFileReader()
33
33
{
34
34
var directories = new List < string > ( ) ;
35
35
36
- // Azure Devops - Windows
37
- if ( Directory . Exists ( @"D:\a\1\s" ) )
36
+ // Azure DevOps
37
+ if ( "true" . Equals ( Environment . GetEnvironmentVariable ( "TF_BUILD" ) , StringComparison . OrdinalIgnoreCase )
38
+ && Environment . GetEnvironmentVariable ( "Build.SourcesDirectory" ) != null )
38
39
{
39
- directories . Add ( @"D:\a\1\s" ) ;
40
+ directories . Add ( Environment . GetEnvironmentVariable ( "Build.SourcesDirectory" ) ) ;
40
41
}
41
42
42
- // Azure Devops - Unix
43
- if ( Directory . Exists ( "/a/1/s" ) )
43
+ // Github Actions
44
+ if ( "true" . Equals ( Environment . GetEnvironmentVariable ( "GITHUB_ACTIONS" ) , StringComparison . OrdinalIgnoreCase )
45
+ && Environment . GetEnvironmentVariable ( "GITHUB_WORKSPACE" ) != null )
44
46
{
45
- directories . Add ( "/a/1/s" ) ;
46
- }
47
-
48
- // Github Actions - Windows
49
- if ( Directory . Exists ( @"D:\a" ) && ! Directory . Exists ( @"D:\a\1\s" ) )
50
- {
51
- directories . Add ( @"D:\a" ) ;
52
- }
53
-
54
- // Github Actions - Unix
55
- if ( Directory . Exists ( "/home/runner/work" ) )
56
- {
57
- directories . Add ( "/home/runner/work" ) ;
47
+ directories . Add ( Environment . GetEnvironmentVariable ( "GITHUB_WORKSPACE" ) ) ;
58
48
}
59
49
60
50
deterministicSourceDirectories = directories ;
You can’t perform that action at this time.
0 commit comments