mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-04 08:04:37 +08:00
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:
co-authored by
Claude Opus 5.5
parent
e0fc59b82f
commit
b3decaa4cd
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user