Skip to content

Commit

Permalink
Fix for bug in porcli
Browse files Browse the repository at this point in the history
This workaround fix a nodejs issue (nodejs/node#21771)
that cause porcli to not work on windows
  • Loading branch information
totomz committed Nov 16, 2018
1 parent 04dfc54 commit 91b4216
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 9 additions & 1 deletion packages/inquirer/lib/ui/baseUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,15 @@ class UI {
// Close the readline
this.rl.output.end();
this.rl.pause();
this.rl.close();

if (/^win/i.test(process.platform)) {
// @see https://github.com/nodejs/node/issues/21771
// rl.close() breaks the event loop in @porketta.io/porcli
}
else {
this.rl.close();
}

}
}

Expand Down
10 changes: 3 additions & 7 deletions packages/inquirer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "inquirer",
"version": "6.2.0",
"name": "@porketta.io/inquirer",
"version": "6.2.0-beta.2",
"description": "A collection of common interactive command line user interfaces.",
"author": "Simon Boudrias <[email protected]>",
"files": [
Expand Down Expand Up @@ -30,11 +30,7 @@
"sinon": "^5.0.0"
},
"scripts": {
"test": "nyc mocha test/**/* -r ./test/before",
"posttest": "nyc report --reporter=text-lcov > ../../coverage/nyc-report.lcov",
"prepublish": "nsp check",
"prepublishOnly": "cp ../../README.md .",
"postpublish": "rm -f README.md"
"test": "nyc mocha test/**/* -r ./test/before"
},
"repository": "SBoudrias/Inquirer.js",
"license": "MIT",
Expand Down

0 comments on commit 91b4216

Please sign in to comment.