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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

--zoom is ignored and defaults to 1 #20

Open
kilianc opened this issue Feb 14, 2016 · 7 comments
Open

--zoom is ignored and defaults to 1 #20

kilianc opened this issue Feb 14, 2016 · 7 comments

Comments

@kilianc
Copy link

kilianc commented Feb 14, 2016

With:

$ himawari --zoom 5 -i

--zoom is ignored and defaults to 1. using latest

This my last attempt for today 馃嵒

@jakiestfu
Copy link
Owner

Correct, invalid zooms default to 1... Infrared only supports up to 3 :)

I'm working on getting ava implemented in this today. Sorry you experienced so much trouble, and I am happy to help in any issues you open.

@kilianc
Copy link
Author

kilianc commented Feb 14, 2016

this is what open source is about!

@jakiestfu
Copy link
Owner

So, to your misfortune, IR is only up to 3 zoom levels (that I could discern), would you consider this a non-issue?

@kilianc
Copy link
Author

kilianc commented Feb 14, 2016

Yep but you should use yargs or manually validate the options so that it is transparent to the user what i can or can't do. Def not a bug, but worth enhancing!

@jakiestfu
Copy link
Owner

Roger that. What experience would you like, for it to throw an err or exit if the options are invalid?

@kilianc
Copy link
Author

kilianc commented Feb 14, 2016

yep console.error + process.exit(1). if you use a args parser they handle this for you and follow all best practices. I'll suggest you look into yargs.

@ungoldman
Copy link
Contributor

Catching this issue with the behavior you're suggesting above is already possible with the current setup (minimist + cliclopts). See optimist for the yargs/minimist origin story :)

DEPRECATION NOTICE
I don't want to maintain this module anymore since I just use minimist, the argument parsing engine, directly instead nowadays.

See yargs for the modern, pirate-themed successor to optimist.

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

Successfully merging a pull request may close this issue.

3 participants