From c7e3b504966c7a87e35548137f2afd4399e8e612 Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 7 Jun 2026 04:37:00 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20trans=20win=20ps=20-File=20support=20(au?= =?UTF-8?q?to=20backslash=E2=86=92forward=20slash)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/src/ssh.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/src/ssh.ts b/scripts/src/ssh.ts index 4ced2e3a..977a2248 100644 --- a/scripts/src/ssh.ts +++ b/scripts/src/ssh.ts @@ -1058,6 +1058,14 @@ function parseWinRouteArgs(route: ParsedSshRoute, args: string[]): ParsedSshArgs } if (operation === "ps" || operation === "powershell" || operation === "powershell.exe") { const commandArgs = args[1] === "--" ? args.slice(2) : args.slice(1); + if (commandArgs.length >= 2 && (commandArgs[0] === "-File" || commandArgs[0] === "-file")) { + const fileArgs = commandArgs.slice(1).map((a: string) => a.replace(/\\/g, "/")).join(" "); + return { + remoteCommand: buildWindowsPowerShellInvocation(buildWindowsPowerShellInlineLauncherScript("& " + fileArgs, route.workspace)), + requiresStdin: false, + invocationKind: "helper", + }; + } if (commandArgs.length === 0) { return { remoteCommand: buildWindowsPowerShellInvocation(buildWindowsPowerShellStdinLauncherScript(route.workspace)),