diff --git a/src/cli/run-main.ts b/src/cli/run-main.ts index 5c3080996..393903cb5 100644 --- a/src/cli/run-main.ts +++ b/src/cli/run-main.ts @@ -52,7 +52,8 @@ 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 normalizeCandidate = (value: string): string => normalizeArg(value).replace(/^\\\\\\?\\/, ""); + const normalizeCandidate = (value: string): string => + normalizeArg(value).replace(/^\\\\\\?\\/, ""); const execPath = normalizeCandidate(process.execPath); const execPathLower = execPath.toLowerCase(); const execBase = path.basename(execPath).toLowerCase(); diff --git a/src/entry.ts b/src/entry.ts index a40a06451..50181f37d 100644 --- a/src/entry.ts +++ b/src/entry.ts @@ -61,7 +61,8 @@ 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 normalizeCandidate = (value: string): string => normalizeArg(value).replace(/^\\\\\\?\\/, ""); + const normalizeCandidate = (value: string): string => + normalizeArg(value).replace(/^\\\\\\?\\/, ""); const execPath = normalizeCandidate(process.execPath); const execPathLower = execPath.toLowerCase(); const execBase = path.basename(execPath).toLowerCase();