Skip to content

Commit 7818fd5

Browse files
committed
Update
1 parent e3447b6 commit 7818fd5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/GraphQL.Authorization.ApiTests/BomTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ public void Files_Should_Not_Use_BOM()
1010
{
1111
string GetPath([CallerFilePath] string path = "") => path; // <GIT_ROOT>\src\GraphQL.ApiTests\BomTests.cs
1212

13-
var gitRoot = new DirectoryInfo(GetPath()).Parent!.Parent!.Parent!;
13+
var callerFilePath = GetPath();
14+
var gitRoot = new FileInfo(callerFilePath).Directory!.Parent!.Parent!;
1415
// Protection from situations when this test is copied to another repo or the folder structure changed, etc.
1516
if (!File.Exists(Path.Combine(gitRoot.FullName, "src", "GraphQL.Authorization.sln")))
1617
throw new InvalidOperationException("Unable to find repository root");

0 commit comments

Comments
 (0)