Open kilianc opened 8 years ago
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.
this is what open source is about!
So, to your misfortune, IR is only up to 3 zoom levels (that I could discern), would you consider this a non-issue?
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!
Roger that. What experience would you like, for it to throw an err or exit if the options are invalid?
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
.
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.
With:
--zoom
is ignored and defaults to 1. using latestThis my last attempt for today :beers: