Skip to content

Commit 495d720

Browse files
committed
update all usages
1 parent d1b9e1a commit 495d720

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/docs-assembler/Cli/LinkCommands.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using ConsoleAppFramework;
1111
using Documentation.Assembler.Links;
1212
using Elastic.Markdown.CrossLinks;
13+
using Elastic.Markdown.IO;
1314
using Elastic.Markdown.IO.Discovery;
1415
using Microsoft.Extensions.Logging;
1516

@@ -48,7 +49,9 @@ public async Task<int> ValidateLocalInboundLinks(string? repository = null, stri
4849
{
4950
AssignOutputLogger();
5051
file ??= ".artifacts/docs/html/links.json";
51-
repository ??= GitCheckoutInformation.Create(new FileSystem()).RepositoryName;
52+
var fs = new FileSystem();
53+
var root = fs.DirectoryInfo.New(Paths.Root.FullName);
54+
repository ??= GitCheckoutInformation.Create(root, new FileSystem()).RepositoryName;
5255
if (repository == null)
5356
throw new Exception("Unable to determine repository name");
5457

tests/Elastic.Markdown.Tests/DocSet/LinkReferenceTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information
44

5+
using Elastic.Markdown.IO;
56
using Elastic.Markdown.IO.Discovery;
67
using Elastic.Markdown.IO.State;
78
using FluentAssertions;
@@ -32,7 +33,8 @@ public class GitCheckoutInformationTests(ITestOutputHelper output) : NavigationT
3233
[Fact]
3334
public void Create()
3435
{
35-
var git = GitCheckoutInformation.Create(ReadFileSystem);
36+
var root = ReadFileSystem.DirectoryInfo.New(Paths.Root.FullName);
37+
var git = GitCheckoutInformation.Create(root, ReadFileSystem);
3638

3739
git.Should().NotBeNull();
3840
git.Branch.Should().NotBeNullOrWhiteSpace();

0 commit comments

Comments
 (0)