diff --git a/packages/inquirer/lib/ui/baseUI.js b/packages/inquirer/lib/ui/baseUI.js index 0567d7c40..0903e9af5 100644 --- a/packages/inquirer/lib/ui/baseUI.js +++ b/packages/inquirer/lib/ui/baseUI.js @@ -55,7 +55,11 @@ class UI { // Close the readline this.rl.output.end(); this.rl.pause(); - this.rl.close(); + + // @see https://github.com/nodejs/node/issues/21771 + if (!/^win/i.test(process.platform)) { + this.rl.close(); + } } }