Skip to content

Commit

Permalink
fix test with missing docset.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz committed Dec 18, 2024
1 parent 614082b commit 9ad983a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Elastic.Markdown/IO/ConfigurationFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ public ConfigurationFile(IFileInfo sourceFile, IDirectoryInfo rootPath, BuildCon
yaml.Load(textReader);

if (yaml.Documents.Count == 0)
{
context.EmitWarning(sourceFile, "empty configuration");
return;
}

// Examine the stream
var mapping = (YamlMappingNode)yaml.Documents[0].RootNode;
Expand Down
1 change: 1 addition & 0 deletions tests/Elastic.Markdown.Tests/OutputDirectoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public async Task CreatesDefaultOutputDirectory()
var logger = new TestLoggerFactory(output);
var fileSystem = new MockFileSystem(new Dictionary<string, MockFileData>
{
{ "docs/source/docset.yml", new MockFileData("") },
{ "docs/source/index.md", new MockFileData("test") }
}, new MockFileSystemOptions
{
Expand Down

0 comments on commit 9ad983a

Please sign in to comment.