test(pr): stub host tools in canonical-wrapper trust tests

CI runners switched to an image without ripgrep, so the parked-canonical wrapper test failed at scripts/pr's required-command check (Missing required command(s): rg) before reaching the trust routing it covers. Stub rg and pnpm in the fixture bin like the other wrapper fixtures.
This commit is contained in:
Peter Steinberger 2026-09-28 21:30:47 -07:00
parent 1470a9bb09
commit 129a64030a

View file

@ -2089,6 +2089,11 @@ exit 99
mkdirSync(join(dir, "bin"));
writeFileSync(join(dir, "bin/gh"), "#!/bin/sh\nexit 99\n");
chmodSync(join(dir, "bin/gh"), 0o755);
// These tests cover wrapper trust routing, not the host command inventory.
for (const command of ["pnpm", "rg"]) {
writeFileSync(join(dir, "bin", command), "#!/bin/sh\nexit 0\n");
chmodSync(join(dir, "bin", command), 0o755);
}
const git = (cwd: string, args: string[]) =>
spawnSync("git", args, { cwd, env, encoding: "utf8", stdio: "pipe" });
expect(git(repo, ["init", "-b", "main"]).status).toBe(0);
@ -2169,6 +2174,11 @@ exit 99
mkdirSync(join(dir, "bin"));
writeFileSync(join(dir, "bin/gh"), "#!/bin/sh\nexit 99\n");
chmodSync(join(dir, "bin/gh"), 0o755);
// These tests cover wrapper trust routing, not the host command inventory.
for (const command of ["pnpm", "rg"]) {
writeFileSync(join(dir, "bin", command), "#!/bin/sh\nexit 0\n");
chmodSync(join(dir, "bin", command), 0o755);
}
const git = (cwd: string, args: string[]) =>
spawnSync("git", args, { cwd, env, encoding: "utf8", stdio: "pipe" });
expect(git(repo, ["init", "-b", "main"]).status).toBe(0);