Skip to content

Commit 4101ba3

Browse files
authored
Ensure we fallback to the embedded navigation.yml for the assembler build (#796)
1 parent c6f90ca commit 4101ba3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/docs-assembler/AssembleContext.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,25 @@ public AssembleContext(
4848
// temporarily fallback to embedded assembler.yml
4949
// This will live in docs-content soon
5050
if (!ReadFileSystem.File.Exists(configPath))
51-
ExtractAssemblerConfiguration(configPath);
51+
ExtractAssemblerConfiguration(configPath, "assembler.yml");
5252
ConfigurationPath = ReadFileSystem.FileInfo.New(configPath);
5353
Configuration = AssemblyConfiguration.Deserialize(ReadFileSystem.File.ReadAllText(ConfigurationPath.FullName));
5454

5555
var navigationPath = Path.Combine(Paths.WorkingDirectoryRoot.FullName, "src", "docs-assembler", "navigation.yml");
5656
if (!ReadFileSystem.File.Exists(navigationPath))
57-
ExtractAssemblerConfiguration(navigationPath);
57+
ExtractAssemblerConfiguration(navigationPath, "navigation.yml");
5858
NavigationPath = ReadFileSystem.FileInfo.New(navigationPath);
5959

6060
CheckoutDirectory = ReadFileSystem.DirectoryInfo.New(checkoutDirectory ?? ".artifacts/checkouts");
6161
OutputDirectory = ReadFileSystem.DirectoryInfo.New(output ?? ".artifacts/assembly");
6262
}
6363

64-
private void ExtractAssemblerConfiguration(string configPath)
64+
private void ExtractAssemblerConfiguration(string configPath, string file)
6565
{
6666
var embeddedStaticFiles = Assembly.GetExecutingAssembly()
6767
.GetManifestResourceNames()
6868
.ToList();
69-
var configFile = embeddedStaticFiles.First(f => f.EndsWith("assembler.yml"));
69+
var configFile = embeddedStaticFiles.First(f => f.EndsWith(file));
7070
using var resourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(configFile);
7171
if (resourceStream == null)
7272
return;

0 commit comments

Comments
 (0)