From 99a618a52cda5fd0c5e2740760b2df393227a875 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sat, 10 Apr 2021 15:53:47 +0200 Subject: [PATCH] Fix GH Actions --- scripts/generateLayerOverview.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/generateLayerOverview.ts b/scripts/generateLayerOverview.ts index ac852ae..b44827f 100644 --- a/scripts/generateLayerOverview.ts +++ b/scripts/generateLayerOverview.ts @@ -94,13 +94,22 @@ for (const themeFile of themeFiles) { console.error("Unknown layer id: ", layer) themeErrorCount++ } - } else if (layer.builtin === undefined) { - // layer.builtin contains layer overrides - we can skip those - layerErrorCount += validateLayer(layer, themeFile.id) + } else { + if (layer.builtin !== undefined) { + if (!knownLayerIds.has(layer.builtin)) { + console.error("Unknown layer id: ", layer.builtin, "(which uses inheritance)") + themeErrorCount++ + } + } else { + // layer.builtin contains layer overrides - we can skip those + layerErrorCount += validateLayer(layer, themeFile.id) + } } } - themeFile.layers = themeFile.layers.filter(l => typeof l != "string") + themeFile.layers = themeFile.layers + .filter(l => typeof l != "string") // We remove all the builtin layer references as they don't work with ts-node for some weird reason + .filter(l => l.builtin === undefined) try { const theme = new LayoutConfig(themeFile, true, "test")