fix: stabilize windows cli tests
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user