Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

fix(gates): mesh-provenance compares paths, so it has to spell them one way

yhh710db39e8ff3
diff --git a/tools/check-mesh-provenance.mjs b/tools/check-mesh-provenance.mjs
index 3ffee8cb3..e6424e951 100644
--- a/tools/check-mesh-provenance.mjs
+++ b/tools/check-mesh-provenance.mjs
@@ -172,7 +172,10 @@ const policies = new Map();
let mints = 0;
for (const file of files) {
- const rel = path.relative(ROOT, file);
+ // Compared against tools/meshProducers.mjs, which spells its paths with
+ // forward slashes: on Windows path.relative gives backslashes, every one of
+ // those comparisons goes the wrong way, and the gate reports the separator.
+ const rel = path.relative(ROOT, file).split(path.sep).join('/');
const code = blank(readFileSync(file, 'utf8'));
for (const hit of occurrences(code)) {
const where = `${rel}:${lineOf(code, hit.index)}`;