Skip to content


Exit if the command is passed in. #30

CoderPuppy opened this Issue · 6 comments

2 participants


If you pass a command in to it like node ./cmd help it currently opens a shell but it seems like it should just exit.

My implementation is call process.exit in the parse callback but asynchronous commands fail then.

celeri.parse(process.argv, function(e, cmd) {
    if(e) throw e;

    if(cmd.command.length) process.exit();

Node should exit if you pass a command into celeri. Make sure you're not calling anywhere in your code - it's basically a wrapper for process.openStdin().

If you're not calling, do you have an example where this possible bug is occurring?


Oh, Thanks.
The example at the top of the README said you should call


Would this work

celeri.parse(process.argv, function(e, cmd) {
    if(e) throw e;


It doesn't work.
What should I run to get it to run a command that was passed in but if one is not passed in open the "shell".


I'd approach it a different way. Instead, perhaps create an interactive command. For example:

var celeri = require("celeri");

celeri.onCommand("interact", function(data)


In terminal, you can call:

node ./cmd interact

to make your app interactive.


Thanks, Sounds good.
But I'm having a different problem now.
I start it node bin/jules.js interact but It just hangs saying:

tty.setRawMode is deprecated. Use `process.stdin.setRawMode()` instead.

When I debugged it it just never got any keystrokes (I did press keys).
On node 0.7.7 compiled from source on Ubuntu 11.04 32-bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.