mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 20:55:30 +02:00
Move to pty-node over custom pty2.js
This commit is contained in:
parent
63ff2a6057
commit
f6f1de4bd8
5 changed files with 19 additions and 20 deletions
|
@ -14,7 +14,7 @@ const Log = require('./logger.js').log;
|
|||
// deps
|
||||
const async = require('async');
|
||||
const _ = require('lodash');
|
||||
const pty = require('ptyw.js');
|
||||
const pty = require('node-pty');
|
||||
const temptmp = require('temptmp').createTrackedSession('transfer_file');
|
||||
const paths = require('path');
|
||||
const fs = require('graceful-fs');
|
||||
|
@ -361,11 +361,14 @@ exports.getModule = class TransferFileModule extends MenuModule {
|
|||
'Executing external protocol'
|
||||
);
|
||||
|
||||
const externalProc = pty.spawn(cmd, args, {
|
||||
cols : this.client.term.termWidth,
|
||||
rows : this.client.term.termHeight,
|
||||
cwd : this.recvDirectory,
|
||||
});
|
||||
const spawnOpts = {
|
||||
cols : this.client.term.termWidth,
|
||||
rows : this.client.term.termHeight,
|
||||
cwd : this.recvDirectory,
|
||||
encoding : null, // don't bork our data!
|
||||
};
|
||||
|
||||
const externalProc = pty.spawn(cmd, args, spawnOpts);
|
||||
|
||||
this.client.setTemporaryDirectDataHandler(data => {
|
||||
// needed for things like sz/rz
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue