Skip to content

Commit

Permalink
child_pty => pty.js
Browse files Browse the repository at this point in the history
  • Loading branch information
matheuss committed Oct 28, 2016
1 parent 8cc47a4 commit 7f29ead
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"repository": "zeit/hyper",
"xo": false,
"dependencies": {
"child_pty": "3.0.1",
"color": "0.11.3",
"convert-css-color-name-to-hex": "0.1.1",
"default-shell": "1.0.1",
Expand All @@ -23,6 +22,7 @@
"mkdirp": "0.5.1",
"ms": "0.7.1",
"node-fetch": "1.6.3",
"pty.js": "https://github.com/Tyriar/pty.js/tarball/c75c2dcb6dcad83b0cb3ef2ae42d0448fb912642",
"semver": "5.3.0",
"shell-env": "0.2.0",
"uuid": "2.0.2"
Expand Down
8 changes: 4 additions & 4 deletions app/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const config = require('./config');

let spawn;
try {
spawn = require('child_pty').spawn;
spawn = require('pty.js').spawn;
} catch (err) {
console.error(
'A native module failed to load. Typically this means ' +
Expand Down Expand Up @@ -69,17 +69,17 @@ module.exports = class Session extends EventEmitter {
this.pty.stdin.write(data);
}

resize({cols: columns, rows}) {
resize({cols, rows}) {
try {
this.pty.stdout.resize({columns, rows});
this.pty.stdout.resize(cols, rows);
} catch (err) {
console.error(err.stack);
}
}

destroy() {
try {
this.pty.kill('SIGHUP');
this.pty.kill();
} catch (err) {
console.error('exit error', err.stack);
}
Expand Down

0 comments on commit 7f29ead

Please sign in to comment.