-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Default subcommand with options #461
Copy link
Copy link
Closed
Labels
Milestone
Description
Hi, I want to use a subcommand as default, and this subcommands has options. Something like this:
//app.js
program
.command('run', 'Execute stuff', {isDefault: true})
.command('list', 'List stuff')
.parse(process.argv);// app-run.js
program
.option('-c, --config <file>', 'use a config file')
.parse(process.argv);This command works fine:
app run -c config.json
And this as well (executes the default subcommand):
app
but on execute the default subcommand with options:
app -c config.json
I have the followin error:
error: unknown option `-c'
Reactions are currently unavailable