Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Matt Godbolt
2026-07-14 16:53:47 +01:00
committed by GitHub
parent 2dd2672049
commit 10f71d06c0

View File

@@ -135,8 +135,10 @@ export async function validateBrandingAssets(staticPath: string, extraBodyClass:
for (const filename of required) {
try {
await fs.access(path.join(staticPath, filename));
} catch {
missing.push(filename);
} catch (e: unknown) {
const err = e as NodeJS.ErrnoException;
if (err.code === 'ENOENT') missing.push(filename);
else throw err;
}
}
if (missing.length > 0) {