heroku/hk — pull request #142 by bgentry (2014-04-07 15:22:04+00:00)
Title: Output short usage on usage errors, improve duplicate scale error message

Fixes #133.

Only print the short usage when the user has made a usage error. Instead of:

```
➜ hk scale web=1 web=1
Usage: hk scale [-a ] =[]:[]...

Scale changes the quantity of dynos (horizontal scale) and/or the
dyno size (vertical scale) for each process type. Note that
changing dyno size will restart all dynos of that type.

Example:

$ hk scale web=2
Scaled myapp to web=2:1X.

$ hk scale web=2:1X worker=5:2X
Scaled myapp to web=2:1X, worker=5:2X.

$ hk scale web=PX worker=1X
Scaled myapp to web=2:PX, worker=5:1X.
```

We now get:

```
➜ ./hk scale -a bgfaketestapp web=1 web=1
error: process type "web" specified more than once
Usage: hk scale [-a ] =[]:[]...
Use 'hk help scale' for more information.
```

I've added a more clear error message for this specific scenario, and that message is much more clear because it's not drowned in a long page of help output.

/cc @max @kr