fix: 改进 Windows SSH PowerShell 错误提示
This commit is contained in:
@@ -24,6 +24,7 @@ import {
|
||||
sshRuntimeTimeoutMs,
|
||||
sshRuntimeTimingHint,
|
||||
sshWindowsPlaneHint,
|
||||
sshWindowsPowerShellPipelineHint,
|
||||
wrapSshRemoteCommand,
|
||||
type SshCaptureResult,
|
||||
} from "./ssh";
|
||||
@@ -435,6 +436,8 @@ async function runRemoteSshWebSocket(
|
||||
if (!timedOut) {
|
||||
const windowsPlaneHint = sshWindowsPlaneHint(invocation, code, stderrTail);
|
||||
if (windowsPlaneHint) process.stderr.write(windowsPlaneHint);
|
||||
const pipelineHint = sshWindowsPowerShellPipelineHint(invocation, code, stderrTail);
|
||||
if (pipelineHint) process.stderr.write(pipelineHint);
|
||||
}
|
||||
const timingHint = formatSshRuntimeTimingHint(sshRuntimeTimingHint({
|
||||
invocation,
|
||||
@@ -615,6 +618,8 @@ async function runRemoteSshWebSocketCaptureRemoteCommand(
|
||||
startedAtMs,
|
||||
}));
|
||||
if (timingHint) stderr += timingHint;
|
||||
stderr += sshWindowsPlaneHint(invocation, code, stderr);
|
||||
stderr += sshWindowsPowerShellPipelineHint(invocation, code, stderr);
|
||||
resolve({ exitCode: code, stdout, stderr });
|
||||
};
|
||||
const openTimer = setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user