godaddy/jiractl

Foot gun: jiractl config set context http://jira.whatever.com

Opened this issue · 0 comments

Feel free to close this, but felt like a gas-powered foot gun for new users. Omitting the - when running:

jiractl config set-context http://jira.whatever.com

leads to

jiractl config set context http://jira.whatever.com

which leads to:

TypeError: Cannot read property 'action' of undefined
    at main (@godaddy/jiractl/bin/cli.js:78:32)
    at Object.<anonymous> (@godaddy/jiractl/bin/cli.js:82:1)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

Easy first time mistake to make, might be friendlier to output something like:

'set' action not found on config. Did you mean:

- 'set-context'
- getEstimator 

n.b. the above assumes of course that the exports of src/config.actions.js are all valid CLI commands, which they may not be.