fix: stabilize windows cli tests
This commit is contained in:
@@ -60,7 +60,7 @@ function ensureExperimentalWarningSuppressed(): boolean {
|
||||
function normalizeWindowsArgv(argv: string[]): string[] {
|
||||
if (process.platform !== "win32") return argv;
|
||||
if (argv.length < 3) 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