| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -73,7 +73,7 @@ ObjectSetPrototypeOf(ReadStream, net.Socket); | |||
| 73 | 73 | ||
| 74 | 74 | ReadStream.prototype.setRawMode = function(flag) { | |
| 75 | 75 | flag = !!flag; | |
| 76 | - const err = this._handle.setRawMode(flag); | ||
| 76 | + const err = this._handle?.setRawMode(flag); | ||
| 77 | 77 | if (err) { | |
| 78 | 78 | this.emit('error', errors.errnoException(err, 'setRawMode')); | |
| 79 | 79 | return this; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,9 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + const common = require('../common'); | ||
| 3 | + | ||
| 4 | + if (!process.stdin.isTTY) { | ||
| 5 | + common.skip('does not apply on non-TTY stdin'); | ||
| 6 | + } | ||
| 7 | + | ||
| 8 | + process.stdin.destroy(); | ||
| 9 | + process.stdin.setRawMode(true); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments