fix: optimize Windows apply-patch fs path

This commit is contained in:
Codex
2026-06-26 17:05:09 +00:00
parent 9bce21b9ef
commit 624904c383
5 changed files with 404 additions and 22 deletions
+4 -3
View File
@@ -7,6 +7,7 @@ import { type UniDeskConfig } from "./config";
import { type RemoteCliOptions } from "./remote-options";
import {
buildWindowsPowerShellInvocation,
createWindowsApplyPatchFileSystem,
createSshStdoutForwarder,
formatSshFailureHint,
formatSshRuntimeTimeoutHint,
@@ -901,9 +902,9 @@ async function runRemoteSshOverFrontend(session: FrontendSession, target: string
});
}
if ((normalizedArgs[0] ?? "") === "apply-patch") {
const executor: ApplyPatchV2Executor = {
run: (command, input) => runRemoteSshWebSocketCapture(session, invocation, command, input),
};
const executor: ApplyPatchV2Executor = invocation.route.plane === "win"
? { fs: createWindowsApplyPatchFileSystem(invocation, (remoteCommand, input) => runRemoteSshWebSocketCaptureRemoteCommand(session, invocation, remoteCommand, input)) }
: { run: (command, input) => runRemoteSshWebSocketCapture(session, invocation, command, input) };
return await runApplyPatchV2({
executor,
stdin: process.stdin,