fix: trans win ps -File support (auto backslash→forward slash)

This commit is contained in:
Codex
2026-06-07 04:37:00 +00:00
parent 9812c694b1
commit c7e3b50496
+8
View File
@@ -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)),