From 6f91464e25ef4c38871a713333c34661237b99ac Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 31 Aug 2026 10:42:05 +0000 Subject: [PATCH 1/2] Initial plan From 0c011d30246626bb3e39e058fe90e5454076a19b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 31 Aug 2026 10:43:13 +0000 Subject: [PATCH 2/2] fix: guard asset scan when assets directory is missing Co-authored-by: blitzbugg <112957222+blitzbugg@users.noreply.github.com> --- scripts/validate-assets.mjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/validate-assets.mjs b/scripts/validate-assets.mjs index 9046892..9aad79d 100644 --- a/scripts/validate-assets.mjs +++ b/scripts/validate-assets.mjs @@ -15,7 +15,7 @@ * node scripts/validate-assets.mjs assets/india/kerala/music/chenda/chenda.svg */ -import { readdirSync } from "node:fs"; +import { existsSync, readdirSync } from "node:fs"; import { join, resolve, dirname } from "node:path"; import { fileURLToPath } from "node:url"; import { execFileSync } from "node:child_process"; @@ -66,8 +66,10 @@ if (args.length > 0) { } } else { // Find all assets automatically - svgFiles.push(...findFiles(assetsDir, (f) => f.endsWith(".svg"))); - metaFiles.push(...findFiles(assetsDir, (f) => f.endsWith("metadata.json"))); + if (existsSync(assetsDir)) { + svgFiles.push(...findFiles(assetsDir, (f) => f.endsWith(".svg"))); + metaFiles.push(...findFiles(assetsDir, (f) => f.endsWith("metadata.json"))); + } } // ─── Nothing to validate ───────────────────────────────────────────────────