Skip to content

Commit 75459d1

Browse files
committed
Less brittle current directory
Base the current directory of the documentation tests on the location of the test assembly instead of `Environment.CurrentDirectory`.
1 parent aae06d4 commit 75459d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GitVersionCore.Tests/DocumentationTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public void VariableDocumentationIsUpToDate()
5757

5858
static string ReadDocumentationFile(string relativeDocumentationFilePath)
5959
{
60-
var currentDirectory = new DirectoryInfo(Environment.CurrentDirectory);
60+
var currentDirectory = new FileInfo(typeof(DocumentationTests).Assembly.Location).Directory;
6161
while (currentDirectory != null)
6262
{
6363
var docsDirectory = currentDirectory

0 commit comments

Comments
 (0)