site-ui-4: the build runs the nav check only where tools/ exists (the gate builds a copy of site/ alone and runs the check as its own line)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-07 10:01:53 +00:00
parent a8461a2848
commit 090bbd2d41

View file

@ -414,4 +414,5 @@ for (const [file, active] of PAGES) {
}
console.log('built: ' + built.join(', '));
// the header rule: every served page carries the full nav (tools/ci/site-nav-check.mjs); the build fails on a shorter one
{ const { spawnSync } = await import('node:child_process'); const r = spawnSync(process.execPath, [join(here, '..', 'tools', 'ci', 'site-nav-check.mjs'), here], { stdio: 'inherit' }); if (r.status !== 0) process.exit(r.status || 1); }
// (the gate builds a copy of site/ alone and runs the check as its own line, so a missing tools/ is not a failure here)
{ const check = join(here, '..', 'tools', 'ci', 'site-nav-check.mjs'); if (existsSync(check)) { const { spawnSync } = await import('node:child_process'); const r = spawnSync(process.execPath, [check, here], { stdio: 'inherit' }); if (r.status !== 0) process.exit(r.status || 1); } }