Skip to content

Commit dd11432

Browse files
author
Ben Newman
committed
Work around a Node 8.1.0 regression that broke meteor login.
1 parent 5c40e61 commit dd11432

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tools/console/console.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,15 @@ Console.prototype.readLine = function (options) {
13251325
var previousProgressDisplay = self._progressDisplay;
13261326
self._setProgressDisplay(new ProgressDisplayNone());
13271327

1328+
Object.getOwnPropertySymbols(process.stdin).forEach(sym => {
1329+
if (/^Symbol\(\w+-decoder\)$/.test(String(sym))) {
1330+
// Node 8.1.0 fails to attach a 'data' listener to process.stdin if
1331+
// it already has a StringDecoder property, so we have to remove
1332+
// that property if we want to use process.stdin again. #node8
1333+
delete process.stdin[sym];
1334+
}
1335+
});
1336+
13281337
// Read a line, throwing away the echoed characters into our dummy stream.
13291338
var rl = readline.createInterface({
13301339
input: process.stdin,

0 commit comments

Comments
 (0)