mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 13:48:41 -09:00
pty.js => node-pty
This commit is contained in:
parent
62c0f80493
commit
3cb09e0480
1 changed files with 3 additions and 3 deletions
|
|
@ -8,13 +8,13 @@ const {getDecoratedEnv} = require('./plugins');
|
||||||
const {productName, version} = require('./package');
|
const {productName, version} = require('./package');
|
||||||
const config = require('./config');
|
const config = require('./config');
|
||||||
|
|
||||||
const createPtyJsError = () => new Error('`node-pty` failed to load. Typically this means that it was built incorrectly. Please check the `README.me` to more info.');
|
const createNodePtyError = () => new Error('`node-pty` failed to load. Typically this means that it was built incorrectly. Please check the `README.me` to more info.');
|
||||||
|
|
||||||
let spawn;
|
let spawn;
|
||||||
try {
|
try {
|
||||||
spawn = require('node-pty').spawn;
|
spawn = require('node-pty').spawn;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw createPtyJsError();
|
throw createNodePtyError();
|
||||||
}
|
}
|
||||||
|
|
||||||
const envFromConfig = config.getConfig().env || {};
|
const envFromConfig = config.getConfig().env || {};
|
||||||
|
|
@ -43,7 +43,7 @@ module.exports = class Session extends EventEmitter {
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (/is not a function/.test(err.message)) {
|
if (/is not a function/.test(err.message)) {
|
||||||
throw createPtyJsError();
|
throw createNodePtyError();
|
||||||
} else {
|
} else {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue