Auto merge of #2681 - alexcrichton:cargo-env-home, r=brson
authorbors <bors@rust-lang.org>
Fri, 13 May 2016 00:28:15 +0000 (17:28 -0700)
committerbors <bors@rust-lang.org>
Fri, 13 May 2016 00:28:15 +0000 (17:28 -0700)
Canonicalize CARGO_HOME fallback on Windows

This commit ensures that we always return the same fallback value on Windows
regardless of whichever shell we happen to be run from. We do this by removing
the `$HOME` environment variable which `std::env::home_dir` will inspect to
force it to fall back to the system APIs. If the old directory exists then we
favor that one, but otherwise we favor locations like `C:\Users\$user`

Supercedes and closes #2604

1  2 
src/cargo/util/config.rs
tests/tests.rs

Simple merge
diff --cc tests/tests.rs
Simple merge