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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in case of creating options via methods '.arr()' + '.def()' #58

Open
eGavr opened this issue Apr 26, 2016 · 1 comment
Open

Bug in case of creating options via methods '.arr()' + '.def()' #58

eGavr opened this issue Apr 26, 2016 · 1 comment

Comments

@eGavr
Copy link

eGavr commented Apr 26, 2016

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
Copy link
Collaborator

qfox commented Apr 26, 2016

It's a bug, dude ;-(

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

No branches or pull requests

2 participants