fix: 收敛受控 CLI 调用与诊断
This commit is contained in:
@@ -1372,11 +1372,12 @@ function writeChunkedStdin(stdin: NodeJS.WritableStream, input: string): void {
|
||||
export async function runSsh(config: UniDeskConfig, providerId: string, args: string[]): Promise<number> {
|
||||
const normalizedArgs = normalizeSshOperationArgs(args);
|
||||
process.stderr.write(sshRouteSeparatorCompatibilityHint(args, normalizedArgs));
|
||||
// 在选择或连接 transport 前完成解析,保证可预测的 route/operation 错误始终在本地失败。
|
||||
const invocation = parseSshInvocation(providerId, normalizedArgs);
|
||||
const plan = sshCaptureBackendPlan(config, process.env);
|
||||
if (plan.backend === "remote-frontend-websocket" && plan.remoteHost !== null) {
|
||||
return await runRemoteSsh(config, plan.remoteHost, providerId, normalizedArgs);
|
||||
}
|
||||
const invocation = parseSshInvocation(providerId, normalizedArgs);
|
||||
const parsed = invocation.parsed;
|
||||
const operationName = normalizedArgs[0] ?? "";
|
||||
if (isSshFileTransferOperation(normalizedArgs)) {
|
||||
|
||||
Reference in New Issue
Block a user