Bug in case of creating options via methods '.arr()' + '.def()'
eGavr opened this issue · 1 comments
eGavr commented
Hi!
I'm using coa in my-script.js
this way:
require('coa').Cmd()
.name(process.argv[1]).title('Makes awesome things').helpful()
.opt()
.name('awesomeOpt')
.title('My awesome option')
.long('awesome-opt')
.arr()
.def(['1', '2'])
.end()
.act(opts => console.log(opts))
.run();
Then I run my script:
$ node my-script.js
The output is:
{ awesomeOpt: [['1', '2']] }
but I expected:
{ awesomeOpt: ['1', '2'] }
qfox commented
It's a bug, dude ;-(