From e5ea457db0393434602609eb481878c0d0a9d69f Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 25 Jul 2017 19:30:03 -0600 Subject: [PATCH] Update to send proper term size for pty --- core/exodus.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/core/exodus.js b/core/exodus.js index 271253e7..e77183ee 100644 --- a/core/exodus.js +++ b/core/exodus.js @@ -164,10 +164,18 @@ exports.getModule = class ExodusModule extends MenuModule { const sshClient = new SSHClient(); - const shellOptions = { + const window = { + rows : self.client.term.termHeight, + cols : self.client.term.termWidth, + width : 0, + height : 0, + term : 'vt100', // Want to pass |self.client.term.termClient| here, but we end up getting hung up on :( + }; + + const options = { env : { exodus : ticket, - } + }, }; sshClient.on('ready', () => { @@ -177,8 +185,7 @@ exports.getModule = class ExodusModule extends MenuModule { return sshClient.end(); }); - sshClient.shell(shellOptions, (err, stream) => { - + sshClient.shell(window, options, (err, stream) => { pipedStream = stream; // :TODO: ewwwwwwwww hack self.client.term.output.pipe(stream); @@ -190,6 +197,10 @@ exports.getModule = class ExodusModule extends MenuModule { restorePipe(); return sshClient.end(); }); + + stream.on('error', err => { + Log.warn( { error : err.message }, 'Exodus SSH client stream error'); + }); }); });