recli icon indicating copy to clipboard operation
recli copied to clipboard

Document auth option and expose in CLI

Open ravi opened this issue 10 years ago • 4 comments

Currently, the authKey can be specified in the YAML file but this is not documented anywhere and it is not exposed in the CLI. Both would be useful to users. I can submit a PR if there is agreement these would be useful.

ravi avatar Jul 10 '15 21:07 ravi

Absolutely, would be great! Can you submit a PR?

stiang avatar Jul 15 '15 07:07 stiang

Need some help to make sure I am not misreading this code in lib/misc.js:

    // Override merged result with command-line options
    for (var opt in opts) {
      if (rawOpts.hasOwnProperty(opt) && rawOpts[opt] !== opts[opt]) {
        opts[opt] = rawOpts[opt];
      }
    }

It seems to me that, with the above, we will overwrite merged results with command-line options only if each specified command-line option has a default or a global or user setting value. In the case of the authKey, a default does not make sense and the above logic becomes problematic, if my understanding is right. Hopefully I am missing something? (it's easy to work around the above of course, but I'd prefer to understand this first).

ravi avatar Jul 21 '15 03:07 ravi

Any thoughts?

ravi avatar Jul 28 '15 18:07 ravi

Hi,

Sorry about the late reply! Looks like you’re right, that won’t work. Feel free to rewrite the logic.

stiang avatar Jul 29 '15 15:07 stiang