diff --git a/site/build.mjs b/site/build.mjs index edf0e48ec..7787fc7ab 100644 --- a/site/build.mjs +++ b/site/build.mjs @@ -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); } }