Closed bcoe closed 2 years ago
Speculation: I will try reproducing later, but my first guess is that your shim is not passing through withValue
successfully and you are getting zero-config behaviour.
I am unable to reproduce the problem as described. I see this behaviour:
const { parseArgs } = require('@pkgjs/parseargs');
const parsed = parseArgs(['--pow', 'xixxle'], {
withValue: ['pow']
})
console.log(parsed);
% node index.js
{ flags: { pow: true }, values: { pow: 'xixxle' }, positionals: [] }
(Wondering why there is there an entry for pow
in flags
? See #38: the README and naming and code are not all in sync! The code is still using existence conventions. Looking forward to making a decision and getting things consistent.)
@shadowspawn let me test again against the latest main
, I wonder if it's a bug we merged a fix for.
I was being silly and not passing the options to the parser.
Parses as:
I believe this should be: