fix: stabilize windows cli tests

This commit is contained in:
Peter Steinberger
2026-01-19 14:44:17 +00:00
parent ef352d4dc6
commit 5df58e404f
3 changed files with 5 additions and 7 deletions

View File

@@ -51,7 +51,7 @@ export async function runCli(argv: string[] = process.argv) {
function stripWindowsNodeExec(argv: string[]): string[] {
if (process.platform !== "win32") return argv;
const normalizeArg = (value: string): string => value.replace(/^"+|"+$/g, "");
const normalizeArg = (value: string): string => value.replace(/^['"]+|['"]+$/g, "").trim();
const normalizeCandidate = (value: string): string =>
normalizeArg(value).replace(/^\\\\\\?\\/, "");
const execPath = normalizeCandidate(process.execPath);