-
-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedpull requests welcomepull requests welcomequestionFurther information is requestedFurther information is requested
Description
Hi,
me again, in my quest to idiot proof the cli ;)
so I have two params, one foo and one bar
const argv = require("minimist")(process.argv.slice(2), {
string: ["foo"],
boolean: ["bar"]
});
if I run it with
--foo alice --bar bob
I get
- argv.foo = alice
- argv.bar=true
- argv._ = ["bob"]
as expected
however, if I run it with
--foo=alice --bar=bob
I get
- argv.foo = alice
- argv.bar=true
- argv._ = []
so a --bar=string is silently converted into --bar = true
is there an option to catch these conversions ?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedpull requests welcomepull requests welcomequestionFurther information is requestedFurther information is requested