From f19af3d2a8ae150aa407c18cab4974e796ae3bfb Mon Sep 17 00:00:00 2001 From: pikastech Date: Mon, 20 Jul 2026 04:49:05 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BB=B6=E9=95=BF=E5=85=AC=E7=BD=91=20P?= =?UTF-8?q?rovider=20=E6=96=87=E4=BB=B6=E4=BC=A0=E8=BE=93=E9=A2=84?= =?UTF-8?q?=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/src/provider-apps-linux.ts | 8 ++++++-- scripts/src/remote-ssh.ts | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/src/provider-apps-linux.ts b/scripts/src/provider-apps-linux.ts index 7587c476..b2bc9680 100644 --- a/scripts/src/provider-apps-linux.ts +++ b/scripts/src/provider-apps-linux.ts @@ -66,6 +66,10 @@ function checked(result: CommandResult, operation: string): CommandResult { return result; } +function transferFailureDetail(result: CommandResult): string { + return [result.stdout.trim(), result.stderr.trim()].filter((value) => value.length > 0).join("\n"); +} + function trans(route: string, operation: string[], timeoutMs = 60_000): CommandResult { return runCommand([transPath, route, ...operation], repositoryRoot, { timeoutMs }); } @@ -257,11 +261,11 @@ async function benchmark(id: string, target: LinuxInstallTarget, args: string[]) remoteFiles.add(remote); process.stderr.write(`${JSON.stringify({ event: "provider-apps.linux.benchmark.stage", stage: "upload", round, bytes: spec.transferBytes })}\n`); const upload = await transAsync(id, ["upload", payload, remote, "--runtime-timeout-ms", "600000"], 600_000, true); - if (upload.exitCode !== 0) throw new Error(`upload failed round=${round}: ${upload.stderr}`); + if (upload.exitCode !== 0) throw new Error(`upload failed round=${round}: ${transferFailureDetail(upload)}`); const localCopy = join(local, `download-${round}.bin`); process.stderr.write(`${JSON.stringify({ event: "provider-apps.linux.benchmark.stage", stage: "download", round, bytes: spec.transferBytes })}\n`); const download = await transAsync(id, ["download", remote, localCopy, "--runtime-timeout-ms", "600000"], 600_000, true); - if (download.exitCode !== 0) throw new Error(`download failed round=${round}: ${download.stderr}`); + if (download.exitCode !== 0) throw new Error(`download failed round=${round}: ${transferFailureDetail(download)}`); const sha = fileSha256(localCopy); if (sha !== payloadSha) throw new Error(`download SHA mismatch round=${round}`); rmSync(localCopy, { force: true }); diff --git a/scripts/src/remote-ssh.ts b/scripts/src/remote-ssh.ts index 272f62aa..a44a776d 100644 --- a/scripts/src/remote-ssh.ts +++ b/scripts/src/remote-ssh.ts @@ -925,7 +925,7 @@ async function runRemoteSshOverFrontend(session: FrontendSession, target: string if (isSshFileTransferOperation(normalizedArgs)) { const executor: SshRemoteCommandExecutor = { streamInactivityTimeoutMs: sshRuntimeTimeoutMs(), - runRemoteCommand: (remoteCommand, input) => runRemoteSshWebSocketCaptureRemoteCommand(session, invocation, remoteCommand, input), + runRemoteCommand: (remoteCommand, input, options) => runRemoteSshWebSocketCaptureRemoteCommand(session, invocation, remoteCommand, input, options), streamRemoteCommand: (remoteCommand, handlers, input, options) => runRemoteSshWebSocketStreamRemoteCommand(session, invocation, remoteCommand, handlers, input, options), }; return await runSshFileTransferOperation(invocation, normalizedArgs, executor, {