Merge pull request #126 from LeeHyungGeun/bugfix/omi-cli-empty-directory

fixed remove line-break bug in OSX
This commit is contained in:
当耐特 2018-10-28 11:20:32 +08:00 committed by GitHub
commit 0eb9906dc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ function init(args) {
process.stdin.resume();
process.stdin.setEncoding("utf-8");
process.stdin.on("data", chunk => {
chunk = chunk.replace(/\s\n|\r\n/g, "");
chunk = chunk.replace(/\s\n|\r\n|\n/g, "");
if (chunk !== "y" && chunk !== "Y") {
process.exit(0);
} else {