TritonDataCenter / node-manta

Node.js SDK for Manta
75 stars 54 forks source link

Version and Help should not require Vars to be Set #328

Closed qdzlug closed 7 years ago

qdzlug commented 7 years ago

Hi,

Without the ENV vars set or passed on the command line (URL, Key, Account), node-manta refuses to provide --version information and whines about missing URL's in --help.

root@morpheus:/etc/ntopng# mput --version
url is a required argument
usage: mput [OPTIONS] path...
options:
    -h, --help                     Print this help and exit.
    --version                      Print version and exit.
    -v, --verbose                  Verbose trace logging.
....
root@morpheus:/etc/ntopng# mput --help
url is a required argument
usage: mput [OPTIONS] path...
options:
    -h, --help                     Print this help and exit.
    --version                      Print version and exit.
    -v, --verbose                  Verbose trace logging.
.....

We should not require those to be set for these two options.

Jay

trentm commented 7 years ago

introduced I believe in commit a4c4ee8fa03b789fca6cd2cf555ad5eda426f718 (joyent/node-manta#312 Custom header input should tolerate ':' characters)

because this line https://github.com/joyent/node-manta/blob/master/lib/options.js#L51 is called before cc.versionCheck... lower down

kellymclaughlin commented 7 years ago

https://cr.joyent.us/#/c/2605