Strip script(1)'s EOF echo without a control-character regex

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Malte Ubl
2026-10-26 14:07:49 -07:00
co-authored by Claude Opus 5.5
parent e0fc59b82f
commit b3decaa4cd
+1 -1
View File
@@ -30,7 +30,7 @@ async function underTerminal(binary: string, env: NodeJS.ProcessEnv): Promise<st
child.stdout.setEncoding("utf8").on("data", (chunk: string) => (stdout += chunk));
const code = await new Promise<number | null>((resolve) => child.on("close", resolve));
expect(code).toBe(0);
return stdout.replace(/\^D\x08\x08/g, "");
return stdout.replaceAll("^D\b\b", "");
}
const repoRoot = join(import.meta.dirname, "../..");
const cli = join(repoRoot, "packages/cli/dist/main.js");