Skip to content

Commit 9ad983a

Browse files
committed
fix test with missing docset.yml
1 parent 614082b commit 9ad983a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/Elastic.Markdown/IO/ConfigurationFile.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ public ConfigurationFile(IFileInfo sourceFile, IDirectoryInfo rootPath, BuildCon
4949
yaml.Load(textReader);
5050

5151
if (yaml.Documents.Count == 0)
52+
{
5253
context.EmitWarning(sourceFile, "empty configuration");
54+
return;
55+
}
5356

5457
// Examine the stream
5558
var mapping = (YamlMappingNode)yaml.Documents[0].RootNode;

tests/Elastic.Markdown.Tests/OutputDirectoryTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public async Task CreatesDefaultOutputDirectory()
1818
var logger = new TestLoggerFactory(output);
1919
var fileSystem = new MockFileSystem(new Dictionary<string, MockFileData>
2020
{
21+
{ "docs/source/docset.yml", new MockFileData("") },
2122
{ "docs/source/index.md", new MockFileData("test") }
2223
}, new MockFileSystemOptions
2324
{

0 commit comments

Comments
 (0)