Auto merge of #2405 - gkoz:reinstall, r=alexcrichton
authorbors <bors@rust-lang.org>
Mon, 2 May 2016 16:54:56 +0000 (09:54 -0700)
committerbors <bors@rust-lang.org>
Mon, 2 May 2016 16:54:56 +0000 (09:54 -0700)
Add `--force` flag to cargo install

Close #2082.

Adding `--force` (`-f`) instructs cargo to overwrite existing binaries (updating the metadata accordingly).
This allows updating crates via `cargo install -f <crate>`.

Installation happens in two stages now: binaries are copied into a temporary subdirectory of the destination first, then moved into destination. This should catch some errors earlier.

In case of installation error cargo will remove new binaries but won't attempt to undo successful overwrites.


Trivial merge