Skip to content

Allow a non-executable to be set as the default command #742

@mojavelinux

Description

@mojavelinux

When designing a CLI that uses command functions, it should still be possible to set a command as the default command if no command is specified. This is pretty much the same functionality as the existing default command, except it will be used for non-executable commands.

cli
  .command('build', { isDefault: true })
  .description('Run the build')
  .action(() => {
    console.log('build!')
  })

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions