-
Notifications
You must be signed in to change notification settings - Fork 1k
Help- and version option description not shown #1820
Copy link
Copy link
Closed
Labels
Description
The code:
const yargs = require('yargs').locale('en')
let output
const options = {
exec: { alias: 'e', desc: 'Dis supposed to be exec', type: 'string', requiresArg: true },
h: { alias: 'help', desc: 'Dis supposed to be help' },
v: { alias: 'version', desc: 'Dis supposed to be version' }
}
yargs.options(options)
yargs.parse(['--help'], (_err, _argv, _output) => { output = _output })
console.log(output)
Expected output:
Options:
-e, --exec Dis supposed to be exec [string]
-h, --help Dis supposed to be help [boolean]
-v, --version Dis supposed to be version [boolean]
Actual output:
Options:
-e, --exec Dis supposed to be exec [string]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
Note
No need for a workaround since I already got one, but I just wanted to mention this so it would get fixed.
Reactions are currently unavailable