8000 Options' defaults not used when using command with init function · Issue #138 · leo/args · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Options' defaults not used when using command with init function #138
Open
@barbu110

Description

@barbu110

Hello!

First of all, I'd like to say I really like args. It has a few things it's not doing correctly right now, but it's going on a great path.

I created an executable, let's call it myexec:

args.options([{
  name: 'target',
  default: 'dev',
  description: '...',
}]);

args.command('cmd', 'description', (name, sub, options) => {
  console.log(options);
});

Running it goes as follows:

$ ./myexec cmd
{}

The options object should contain the default value of target and it's missing. I think this is a bad problem unless a simple workaround exists. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0