You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const{ task, logger, option, argv }=require('just-task');option('name',{describe: 'user name or something'});task('blimey','An exclamation of surprise.',function(){logger.info(`blimey! ${argv().name}`);});
Actual behaviour
Basically --help output always invokes yargs default help command.
just --help
just blimey --help
Expected behaviour
just blimey --help
Options:
--name user name or something [string]
--help Show help [boolean]
--version Show version number [boolean]
The text was updated successfully, but these errors were encountered:
Hotell
changed the title
task help via option() doesn't do anything
task help generation via option() doesn't do anything
Jan 14, 2021
Hotell
changed the title
task help generation via option() doesn't do anything
bug: task help generation via option() doesn't do anything
Jan 14, 2021
Hotell
changed the title
bug: task help generation via option() doesn't do anything
bug: task help generation via option() doesn't work
Jan 18, 2021
option() as a mechanism is a poor choice for providing command line arguments, as then all arguments defined with it will be global to all tasks. It would be much nicer if I could define options per task:
const{ task, logger, option, argv }=require('just-task');option('name',{describe: 'user name or something'});task('blimey','An exclamation of surprise.',function(){logger.info(`blimey! ${argv().name}`);});task('something','This task does not use arguments',function(){logger.info('I do not use name, yet the help text shows it as a valid argument')})
Repro
Actual behaviour
Basically
--help
output always invokes yargs default help command.Expected behaviour
The text was updated successfully, but these errors were encountered: