Skip to content

Commit 7cd4ee8

Browse files
t3dotggclaude
andcommitted
fix(scripts): check:changed reads non-ASCII paths and keys on CI
- Run git with core.quotePath=false. Git quoted non-ASCII paths, so the key never read those files and format, lint, and tests skipped them. - Raise the git helper's output limit to 64 MiB, so a large untracked listing cannot throw before any check runs. - Add CI to the key: vite.config.ts rejects .only only under CI. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent d7a5aba commit 7cd4ee8

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎scripts/check-changed.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,13 @@ import { decide, readWorkspace } from "../.github/scripts/ci-changes.cjs";
2222
const root = NodePath.resolve(import.meta.dirname, "..");
2323
const CODE = /\.[cm]?[jt]sx?$/;
2424

25+
// quotePath=false keeps non-ASCII paths as real paths instead of quoted escapes.
2526
const git = (...args: Array<string>) =>
26-
NodeChildProcess.execFileSync("git", args, { cwd: root, encoding: "utf8" })
27+
NodeChildProcess.execFileSync("git", ["-c", "core.quotePath=false", ...args], {
28+
cwd: root,
29+
encoding: "utf8",
30+
maxBuffer: 64 * 1024 * 1024,
31+
})
2732
.split("\n")
2833
.filter(Boolean);
2934

@@ -60,7 +65,8 @@ console.log(`check:changed: ${files.length} files since ${base.slice(0, 12)}`);
6065
// cached as passing.
6166
const inputKey = () => {
6267
const hash = NodeCrypto.createHash("sha256");
63-
hash.update(`${process.version}\0${base}\0`);
68+
// CI changes test behavior (vite.config.ts rejects .only under CI).
69+
hash.update(`${process.version}\0${base}\0${process.env.CI ?? ""}\0`);
6470
hash.update(
6571
NodeChildProcess.execFileSync(
6672
"git",

0 commit comments

Comments
 (0)