dalejung / inode

Interactive Node.js
MIT License
3 stars 1 forks source link

do not run repl_pause on single variable expressions #21

Open dalejung opened 11 years ago

dalejung commented 11 years ago

Take the following run within a Fiber

bridge.list_kernels.sync();
kernel = bridge.start_kernel.sync(notebook_id);
global.kernel = kernel;
global.out = kernel.pull('d');

out is a Q.promise. However, because it has out.pause_repl = true, it shows up as the resolved output in repl the first time it is run.

>>> out
1
>>> out
[object Object]

This used to happen everytime, except I changed that with https://github.com/dalejung/inode/commit/b37f6f1611e140dc53922b495fb3c45b30c3aa49.

This isn't a huge issue since it can only happen once, but when you have a single variable line into REPL, it shouldn't wait and then output the resolved data.