diff options
author | Alexander Mills <alex@oresoftware.com> | 2018-09-19 11:09:25 -0700 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2018-09-22 11:19:26 +0300 |
commit | 1f4d4c0da87db42f97f43d8374967071fe85b37a (patch) | |
tree | 7aec1ced348c3e9ffcae982621ac3eb0b916726f /lib/tty.js | |
parent | 2b29df71ebc07cea87e14ed7f2d93e78f8b04b3c (diff) | |
download | android-node-v8-1f4d4c0da87db42f97f43d8374967071fe85b37a.tar.gz android-node-v8-1f4d4c0da87db42f97f43d8374967071fe85b37a.tar.bz2 android-node-v8-1f4d4c0da87db42f97f43d8374967071fe85b37a.zip |
tty: make `readStream.setRawMode()` return `this`
PR-URL: https://github.com/nodejs/node/pull/22950
Fixes: https://github.com/nodejs/node/issues/22916
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Diffstat (limited to 'lib/tty.js')
-rw-r--r-- | lib/tty.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/tty.js b/lib/tty.js index 4e78347c2d..3cc2320e96 100644 --- a/lib/tty.js +++ b/lib/tty.js @@ -71,9 +71,10 @@ ReadStream.prototype.setRawMode = function(flag) { const err = this._handle.setRawMode(flag); if (err) { this.emit('error', errors.errnoException(err, 'setRawMode')); - return; + return this; } this.isRaw = flag; + return this; }; function WriteStream(fd) { |