(data: Buffer)
| 70 | } |
| 71 | |
| 72 | private onData(data: Buffer) { |
| 73 | try { |
| 74 | if (this.logFd >= 0) { |
| 75 | fs.writeSync(this.logFd, data); |
| 76 | } |
| 77 | if (this.options.type === 'binary') { |
| 78 | this.binaryFormatter.writeBinary(data); |
| 79 | } else { |
| 80 | this.writeNonBinary(data); |
| 81 | } |
| 82 | } |
| 83 | catch (e) { |
| 84 | magentaWrite(`Error writing data: ${e}\n`, this.ptyTerm); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | private openLogFile() { |
| 89 | this.logFd = -1; |
no test coverage detected