diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/internal/errors.js | 3 | ||||
-rw-r--r-- | lib/tty.js | 13 |
2 files changed, 1 insertions, 15 deletions
diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 19638b83ee..b9a1282c6e 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -844,9 +844,6 @@ E('ERR_TRANSFORM_ALREADY_TRANSFORMING', E('ERR_TRANSFORM_WITH_LENGTH_0', 'Calling transform done when writableState.length != 0', Error); E('ERR_TTY_INIT_FAILED', 'TTY initialization failed', SystemError); -E('ERR_TTY_WRITABLE_NOT_READABLE', - 'The Writable side of a TTY is not Readable', - Error); E('ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET', '`process.setupUncaughtExceptionCapture()` was called while a capture ' + 'callback was already active', diff --git a/lib/tty.js b/lib/tty.js index 83e00df110..62945a78eb 100644 --- a/lib/tty.js +++ b/lib/tty.js @@ -25,11 +25,7 @@ const { inherits, _extend } = require('util'); const net = require('net'); const { TTY, isTTY } = internalBinding('tty_wrap'); const errors = require('internal/errors'); -const { - ERR_INVALID_FD, - ERR_TTY_INIT_FAILED, - ERR_TTY_WRITABLE_NOT_READABLE -} = errors.codes; +const { ERR_INVALID_FD, ERR_TTY_INIT_FAILED } = errors.codes; const { getColorDepth } = require('internal/tty'); // Lazy loaded for startup performance. @@ -131,13 +127,6 @@ WriteStream.prototype._refreshSize = function() { } }; -// A WriteStream is not readable from, so _read become a no-op. -// this method could still be called because net.Socket() -// is a duplex -WriteStream.prototype._read = function() { - this.destroy(new ERR_TTY_WRITABLE_NOT_READABLE()); -}; - // Backwards-compat WriteStream.prototype.cursorTo = function(x, y) { if (readline === undefined) readline = require('readline'); |