Update to send proper term size for pty

This commit is contained in:
Bryan Ashby 2017-07-25 19:30:03 -06:00
parent ca45656c11
commit e5ea457db0
1 changed files with 15 additions and 4 deletions

View File

@ -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');
});
});
});