require options
See original GitHub issueHi there,
Love the nest-commander package - very helpful to get cli functionality with nestjs 😃
Have hit a slight issue where adding the hint to indicate that a flag is required doest seem to be honoured, is that right or am I using it wrong ly. Example below to hopefully clarify what I mean…
so if i want to make an arg --sample-arg
required I should
so according to the docs, using <>
should make the flag required
@Option({
flags: '-s --sample-arg <sampleArg>',
})
parseArg(val: string): string {
return val;
}
however i can execute the command above without supplying -s
flag so it looks like the option below (using []
syntax) is effectively the same
@Option({
flags: '-s --sample-arg [sampleArg]',
})
parseArg(val: string): string {
return val;
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
RequireJS API
You will typically use a data-main script to set configuration options and then load the first application module. Note: the script tag require.js...
Read more >Node.js "require" function and parameters - Stack Overflow
When you call lib = require("lib.js")(params). You're actually calling lib.js with one parameter containing two properties name app and ...
Read more >Command-line API | Node.js v19.3.0 Documentation
Options from the command line take precedence over options passed through the ... (Requires Node.js to be built against FIPS-compatible OpenSSL.) ...
Read more >OPTIONS - HTTP - MDN Web Docs
The HTTP OPTIONS method requests permitted communication options for a given URL or server. A client can specify a URL with this method, ......
Read more >Command-line interface / Commands - Composer
Appending a + makes it only ignore the upper-bound of the requirements. For example, if a package requires php: ^7 , then the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ah ok that makes sense - thanks for clarifying…
required option would be super useful, am happy to contribute if want any help but need a pointer of where to begin :-p
awesome thanks @jmcdo29