fix: bound cli dump previews from yaml
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
buildWindowsPowerShellInvocation,
|
||||
createPosixApplyPatchFileSystem,
|
||||
createWindowsApplyPatchFileSystem,
|
||||
createSshStderrForwarder,
|
||||
createSshStdoutForwarder,
|
||||
formatSshFailureHint,
|
||||
formatSshRuntimeTimeoutHint,
|
||||
@@ -382,6 +383,10 @@ async function runRemoteSshWebSocket(
|
||||
invocation,
|
||||
transport: "frontend-websocket",
|
||||
});
|
||||
const stderrForwarder = parsed.remoteCommand === null ? null : createSshStderrForwarder({
|
||||
invocation,
|
||||
transport: "frontend-websocket",
|
||||
});
|
||||
let timedOut = false;
|
||||
const openTimer = setTimeout(() => {
|
||||
if (sessionReady || settled) return;
|
||||
@@ -464,8 +469,14 @@ async function runRemoteSshWebSocket(
|
||||
}
|
||||
if (message.type === "ssh.data") {
|
||||
const chunk = Buffer.from(String(message.data ?? ""), message.encoding === "base64" ? "base64" : "utf8");
|
||||
if (message.stream === "stderr") process.stderr.write(chunk);
|
||||
else if (stdoutForwarder === null) {
|
||||
if (message.stream === "stderr") {
|
||||
if (stderrForwarder === null) {
|
||||
process.stderr.write(chunk);
|
||||
} else {
|
||||
const hint = stderrForwarder.write(chunk);
|
||||
if (hint !== null) process.stderr.write(hint);
|
||||
}
|
||||
} else if (stdoutForwarder === null) {
|
||||
process.stdout.write(chunk);
|
||||
} else {
|
||||
const hint = stdoutForwarder.write(chunk);
|
||||
|
||||
Reference in New Issue
Block a user