Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI boolean options don't work as expected #213

Closed
dignifiedquire opened this issue Dec 6, 2012 · 4 comments
Closed

CLI boolean options don't work as expected #213

dignifiedquire opened this issue Dec 6, 2012 · 4 comments

Comments

@dignifiedquire
Copy link
Member

The following throws an error

$ testacular start --single-run testacular.conf.js

but

$ testacular start --single-run --log-level error testacular.conf.js

and

$ testacular start testacular.conf.js --single-run

The reason is that optimist interprets testacular.conf.js as the value of the option single-run and so the config file isn't defined.

See also substack/node-optimist#42

@dignifiedquire
Copy link
Member Author

This seems to be more work than I expected. I've used commander.js in other projects and I think it would make for cleaner code and the correct outcome of these inputs.
Some example code can be seen here.

@vojtajina
Copy link
Contributor

I believe I fixed this issue in optimist.

@vojtajina
Copy link
Contributor

Sorry, just looked up the history and it was something different.

We can definitely look into using commander...

@johnjbarton
Copy link
Contributor

Super old, please reopen if this is still important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants