Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Happyrobot33 committed May 30, 2024
1 parent 7f85a88 commit a83cd29
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CodeCoverage/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ public static void Main(string[] args)

//try to make a basepath
string workingDirectory = Environment.CurrentDirectory;
string projectDirectory = Directory.GetParent(workingDirectory).Parent.Parent.Parent.FullName;
//check if we can see the Packages folder
if(!Directory.Exists(basePath + @"\Packages"))
{
//if we cant, then we are in the wrong directory, so go up a few directories
basePath = Directory.GetParent(workingDirectory).Parent.Parent.Parent.Parent.FullName;

Check warning on line 52 in CodeCoverage/Program.cs

View workflow job for this annotation

GitHub Actions / build-listing

Dereference of a possibly null reference.

Check warning on line 52 in CodeCoverage/Program.cs

View workflow job for this annotation

GitHub Actions / build-listing

Dereference of a possibly null reference.

Check warning on line 52 in CodeCoverage/Program.cs

View workflow job for this annotation

GitHub Actions / build-listing

Dereference of a possibly null reference.

Check warning on line 52 in CodeCoverage/Program.cs

View workflow job for this annotation

GitHub Actions / build-listing

Dereference of a possibly null reference.

Check warning on line 52 in CodeCoverage/Program.cs

View workflow job for this annotation

GitHub Actions / build-listing

Dereference of a possibly null reference.
}
Console.WriteLine("Working Directory: " + projectDirectory);

Check failure on line 54 in CodeCoverage/Program.cs

View workflow job for this annotation

GitHub Actions / build-listing

The name 'projectDirectory' does not exist in the current context
basePath = projectDirectory;

Check failure on line 55 in CodeCoverage/Program.cs

View workflow job for this annotation

GitHub Actions / build-listing

The name 'projectDirectory' does not exist in the current context
XMLPath = basePath + XMLPath;
Expand Down

0 comments on commit a83cd29

Please sign in to comment.