Skip to content

Commit bf017ed

Browse files
committed
fix Node REPL
1 parent 936c167 commit bf017ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/lips.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ function print(result) {
123123
try {
124124
const ret = env.get('repr')(last, true);
125125
process.stdout.write('\x1b[K' + ret.toString());
126+
return true;
126127
} catch(e) {
127128
print_error(e, options.t || options.trace);
128129
}
@@ -635,8 +636,7 @@ function run_repl(err, rl) {
635636
return result;
636637
}).then(function(result) {
637638
if (process.stdin.isTTY) {
638-
print(result);
639-
if (newline || is_emacs) {
639+
if (print(result)) {
640640
// readline doesn't work with not ended lines
641641
// it ignore those, so we end them ourselves
642642
process.stdout.write('\n');

0 commit comments

Comments
 (0)