Netflix / unleash

Professionally publish your JavaScript modules in one keystroke
http://netflix.github.io/unleash/
Apache License 2.0
594 stars 26 forks source link

Passing multiple version type flags results in an error #10

Closed micahr closed 6 years ago

micahr commented 6 years ago

When accidentally using both the -m and -p flags in one command, I got the following error:

foo> ツ unleash -m -p
/usr/local/lib/node_modules/unleash/index.js:132
      throw new Error('You\'re confusing me! Please don\'t pass more than one version type flag')
      ^

Error: You're confusing me! Please don't pass more than one version type flag
    at /usr/local/lib/node_modules/unleash/index.js:132:13
    at Array.forEach (native)
    at Object.<anonymous> (/usr/local/lib/node_modules/unleash/index.js:129:19)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:383:7)

The error message is useful, but it should be shown to the user in a more presentable fashion.

jameswomack commented 6 years ago
screenshot 2017-11-11 04 36 20

@micahr handled this in 2.0.1