mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-24 13:29:55 +00:00
node-pty proper import
This commit is contained in:
parent
25131a5e92
commit
a697e063a6
@ -2,7 +2,7 @@
|
||||
module.exports = function patchPTYModule (mod) {
|
||||
const oldSpawn = mod.spawn
|
||||
if (mod.patched) {
|
||||
return mod
|
||||
return
|
||||
}
|
||||
mod.patched = true
|
||||
mod.spawn = (file, args, opt) => {
|
||||
@ -51,5 +51,4 @@ module.exports = function patchPTYModule (mod) {
|
||||
})
|
||||
return terminal
|
||||
}
|
||||
return mod
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
import psNode = require('ps-node')
|
||||
let nodePTY
|
||||
import * as fs from 'mz/fs'
|
||||
import * as os from 'os'
|
||||
import * as nodePTY from 'node-pty'
|
||||
|
||||
import { Observable, Subject } from 'rxjs'
|
||||
import { first } from 'rxjs/operators'
|
||||
import { Injectable } from '@angular/core'
|
||||
@ -322,8 +323,7 @@ export class SessionsService {
|
||||
constructor (
|
||||
log: LogService,
|
||||
) {
|
||||
nodePTY = require('node-pty')
|
||||
nodePTY = require('../bufferizedPTY')(nodePTY)
|
||||
require('../bufferizedPTY')(nodePTY)
|
||||
this.logger = log.create('sessions')
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user