brettviren / moo

ruminants on module oriented programming
GNU General Public License v3.0
4 stars 4 forks source link

More robust MOO_LOAD_PATH handling #22

Closed brettviren closed 3 years ago

brettviren commented 3 years ago

The moo cli gets tripped by badly formed MOO_LOAD_PATH or similar abuse as cli arg

$ moo version
0.5.x

$ MOO_LOAD_PATH=/tmp moo version
0.5.x

$ MOO_LOAD_PATH=/tmp: moo version                                     
Usage: moo [OPTIONS] COMMAND [ARGS]...
Try 'moo --help' for help.

Error: Invalid value for '-M' / '--mpath': Directory '' does not exist.

$ moo -M '' version                                                   
Usage: moo [OPTIONS] COMMAND [ARGS]...
Try 'moo --help' for help.

Error: Invalid value for '-M' / '--mpath': Directory '' does not exist.
brettviren commented 3 years ago

This error is actually click doing its job.