fix: Do not ignore file resources with json file ext (#4562)

This commit is contained in:
wendrul
2024-10-21 17:44:16 +02:00
committed by GitHub
parent b8a6a11635
commit 2079b2e7e1
+2 -2
View File
@@ -618,8 +618,8 @@ export async function elementsToMap(
for await (const entry of readDirRecursiveWithIgnore(ignore, els)) {
if (entry.isDirectory || entry.ignored) continue;
const path = entry.path;
if (json && path.endsWith(".yaml")) continue;
if (!json && path.endsWith(".json")) continue;
if (json && path.endsWith(".yaml") && !isFileResource(path)) continue;
if (!json && path.endsWith(".json") && !isFileResource(path)) continue;
const ext = json ? ".json" : ".yaml";
if (!skips.includeSchedules && path.endsWith(".schedule" + ext)) continue;
if (!skips.includeUsers && path.endsWith(".user" + ext)) continue;