Skip to content

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

@alanchenchen

Description

@alanchenchen

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'.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions