Skip to content

Commit

Permalink
Upgrade shon and fix CLI IO bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Jan 13, 2018
1 parent c2f66d9 commit 3c4480f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 25 deletions.
10 changes: 1 addition & 9 deletions kni.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ function main() {
]);
}

if (config.expected === process.stdin) {
config.expected = null;
}

if (config.expected) {
read(config.expected, 'utf8', function onTypescript(err, typescript) {
if (err) {
Expand All @@ -132,7 +128,6 @@ function main() {
return;
}
test(kniscript, typescript);
process.stdin.pause();
});
return;
}
Expand All @@ -152,7 +147,7 @@ function main() {
engine.debug = true;
}

if (config.waypoint !== process.stdin) {
if (config.waypoint) {
read(config.waypoint, 'utf8', function onWaypoint(err, waypoint) {
if (err) {
console.error(err.message);
Expand All @@ -164,8 +159,6 @@ function main() {
} else {
engine.resume();
}
} else {
process.stdin.pause();
}
}

Expand Down Expand Up @@ -267,4 +260,3 @@ function dump(errors) {
}

main();

28 changes: 13 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"dependencies": {
"pop-equals": "^1.0.0",
"shon": "^3.0.5",
"shon": "^4.0.0",
"system": "^1.0.6",
"table": "^3.7.8",
"tee": "^0.2.0",
Expand Down

0 comments on commit 3c4480f

Please sign in to comment.