From 872ea808ca0e4d1e37e3cf6fff5857ed34052c02 Mon Sep 17 00:00:00 2001 From: Pablo Derendinger <98769613+pderendinger-everse@users.noreply.github.com> Date: Mon, 23 Feb 2026 13:42:20 -0300 Subject: [PATCH] Fixes URL parsing on Windows Addresses an issue where the `cmd.exe` command interpreter on Windows incorrectly parses URLs containing ampersands ('&') when opening them in the browser. Replaces the `cmd` command with `powershell` to properly handle URLs passed to `Start-Process`. --- src/aps-auth.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/aps-auth.ts b/src/aps-auth.ts index 81a7b04..24eb87c 100644 --- a/src/aps-auth.ts +++ b/src/aps-auth.ts @@ -231,8 +231,9 @@ function openBrowser(url: string): void { let args: string[]; if (process.platform === "win32") { - program = "cmd"; - args = ["/c", "start", "", url]; + // Use PowerShell to avoid cmd.exe treating '&' in the URL as a command separator. + program = "powershell"; + args = ["-NoProfile", "-NonInteractive", "-Command", `Start-Process '${url}'`]; } else if (process.platform === "darwin") { program = "open"; args = [url];