-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Hi, i need to define command like:
program.command "env save [project] [environment]"
.option "-i, --interactive", "descr.."
.option "-f, --force", "descr.."
.action () ->
console.log arguments
however when calling it like prgname env save aaa bbb gets me output of:
{ '0': 'save',
'1': 'aaa',
'2':
Command {
commands: [],
options: [ [Object], [Object] ],
_execs: {},
_allowUnknownOption: false,
_args: [ [Object], [Object] ],
_name: 'env',
_noHelp: false,
parent:
Command {
commands: [Object],
options: [],
_execs: {},
_allowUnknownOption: false,
_args: [],
_name: 'maratonec',
Command: [Function: Command],
Option: [Function: Option],
_events: [Object],
_eventsCount: 9,
rawArgs: [Object],
args: [Object] },
_description: 'Saves environment variables into local .env file',
_events: { interactive: [Function], force: [Function] },
_eventsCount: 2 } }
I don't want to use the git-style approach, since process spawning and requiring all libraries for every child-process is really slowing down the program (and cli uilities should be fast, shoudn't they?)
So is there a chance to define such command?
Reactions are currently unavailable