don't repatch node-pty on window reload

This commit is contained in:
Eugene Pankov 2018-03-29 14:23:33 +02:00
parent 663da34e6d
commit c90a5678cf

View file

@ -1,6 +1,10 @@
module.exports = function patchPTYModule (path) {
const mod = require(path)
const oldSpawn = mod.spawn
if (mod.patched) {
return mod
}
mod.patched = true
mod.spawn = (file, args, opt) => {
let terminal = oldSpawn(file, args, opt)
let timeout = null