colinmollenhour/modman

Options ordering and relevant documentation broken

shb opened this issue · 1 comments

shb commented

Modman parsing of command line arguments and options is contrived in inextricable ways and documentation is of no help. Two cases:

  1. For the 'deploy' command, --modmandir option works if and only if it is put between 'deploy' and module name, it won't have any effects otherwise. The right syntax is modman deploy --modmandir <path> <module> <options>
  2. For the 'link' command, help states the syntax link <path> so one is induced in thinking that module source path should be put before immediately after the command and before all the following arguments, as per the module command syntax: modman <command> [<module>] [<options>] [[--] <VCS options>], but again no: path is actually an additional argument to be put after the module name and before options, and help does not give any hint for this. Here we are with modman link <module> <path> <options>

Tried on version 1.12 and using options --force and --copy.

I will concede that the options parsing is pretty poor and thanks for pointing out specifically where there are issues that need to be fixed. Maybe I'll address these someday but don't hold your breath. :) Would be happy to accept a PR that fixed it without breaking BC.