pake icon indicating copy to clipboard operation
pake copied to clipboard

allow pakefile to add definition of custom parameters

Open gggeek opened this issue 14 years ago • 3 comments

Right now any custom parameter passed on the command line is rejected (ie. all the ones not defined in pakeapp class).

It would be nice if the user could add support for custom parameters, a la java (eg. -Dmyparam=myvalue), or by plain registration of more options.

As far as I can tell, this is now impossible, as the function run() does not allow to specify extra options definitions, but only options values. Also the do_option() method should be modified accordingly

gggeek avatar Apr 07 '11 11:04 gggeek

PS: I just found out that optional arguments and options can be added on the cli after the name of the task. Duh. This allows me to reach my goals, but in a slightly more awkward way: for a generic parameter, I have to add its handling to all of my actions...

gggeek avatar Apr 07 '11 12:04 gggeek

Tasks have arguments and named parameters (second and third parameters to run_XXXX functions).

On command-line they should be given after task name

07.04.2011, в 15:42, [email protected] написал(а):

Right now any custom parameter passed on the command line is rejected (ie. all the ones not defined in pakeapp class).

It would be nice if the user could add support for custom parameters, a la java (eg. -Dmyparam=myvalue), or by plain registration of more options.

As far as I can tell, this is now impossible, as the function run() does not allow to specify extra options definitions, but only options values. Also the do_option() method should be modified accordingly

Reply to this email directly or view it on GitHub: https://github.com/indeyets/pake/issues/12

indeyets avatar Apr 07 '11 12:04 indeyets

"generic" arguments is an open question. so, I leave this bug opened

indeyets avatar Apr 07 '11 19:04 indeyets