We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ec6ea0 commit 3d0ff8cCopy full SHA for 3d0ff8c
packages/inquirer/lib/ui/baseUI.js
@@ -2,6 +2,7 @@
2
var _ = require('lodash');
3
var MuteStream = require('mute-stream');
4
var readline = require('readline');
5
+var { PassThrough } = require('stream');
6
7
/**
8
* Base interface class other can inherits from
@@ -70,6 +71,14 @@ function setupReadlineOptions(opt) {
70
71
ms.pipe(opt.output || process.stdout);
72
var output = ms;
73
74
+ if (/^win/i.test(process.platform)) {
75
+ // @see https://github.com/nodejs/node/issues/21771
76
+ // rl.close() closes main stream.
77
+ var oldInput = input;
78
+ input = new PassThrough();
79
+ oldInput.pipe(input);
80
+ }
81
+
82
return _.extend(
83
{
84
terminal: true,
0 commit comments