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

【bugfix】output render foramt error while flag instance using inject #1

Open
alanchenchen opened this issue Aug 2, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@alanchenchen
Copy link
Member

example:

const { flag, output } = require('@alanchenchen/commandlineflag');
const program = flag();
const doc = output();

program
  .option('-c | --config', 'set config source path', ({ index, param}, args) => {
    console.log('index', index);
    console.log('param', param);
    console.log('args', args);
  })
  .option('-h | --help', () => {
    doc.render(true);
  })
  .version(require('../package').version)
  .run();

next, input command in terminal

$ ssh-deploy -h

  Usage: flag <command> [options]

    ssh-deploy CLI

  Options:

    -V, --version   output the version number
    -h, --help      output usage information
    -c | --config   set config file path

option '-c | --config' is not good, it should be '-c , --config'.

@alanchenchen alanchenchen added the bug Something isn't working label Aug 2, 2021
@alanchenchen alanchenchen self-assigned this Aug 2, 2021
@alanchenchen alanchenchen changed the title 【bugfix】output render foramt error when flag instance using inject 【bugfix】output render foramt error while flag instance using inject Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant