Auto merge of #4547 - lukaslueg:installlisterror, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 29 Sep 2017 07:09:41 +0000 (07:09 +0000)
committerbors <bors@rust-lang.org>
Fri, 29 Sep 2017 07:09:41 +0000 (07:09 +0000)
Improve error message for crippled .crates.toml

In case `.crates.toml` can't be parsed for some reason, the user is left wondering where to look. The problem is exasperated by the fact that `.cargo.toml` is a hidden file. Improve the error message during `install`/`uninstall`/`list` and point to the path of `.crates.toml`. A error message might now look like

> error: failed to parse crate metadata at `/home/foobar/.cargo/.crates.toml`
>
> Caused by:
>   invalid TOML found for metadata
>
> Caused by:
>   ...

A unit-test for a crippled `.cargo.toml` had been missing before, added that.


Trivial merge