Closed bfabec closed 5 years ago
Hi, the syntax you want is:
const options = commandLineArgs(argData[command].definitions, { argv });
The second argument to commandLineArgs
is an options object, not an array. See the docs.
@75lb thanks for that!
The defaultOption is now being required in the definitions which is breaking our scripts in 5.0.1. This is new for the current version, as 4.0.7 was/is working fine.
Sample test program:
Sample output: