diff options
| author | Shotaro Yamada <sinkuu@sinkuu.xyz> | 2019-10-04 11:05:44 +0900 |
|---|---|---|
| committer | Shotaro Yamada <sinkuu@sinkuu.xyz> | 2019-10-04 11:11:40 +0900 |
| commit | 248251b3b26c5f21e2c2f5bfa5d85cc17b13fc05 (patch) | |
| tree | 749bfda71641ec19e8a022fd1601619df970c9e0 | |
| parent | 20b73514395bb442fb16ce913b6c2b3965ff3156 (diff) | |
| download | rust-248251b3b26c5f21e2c2f5bfa5d85cc17b13fc05.tar.gz rust-248251b3b26c5f21e2c2f5bfa5d85cc17b13fc05.zip | |
Use home::cargo_home
| -rw-r--r-- | clippy_dev/Cargo.toml | 2 | ||||
| -rw-r--r-- | clippy_dev/src/fmt.rs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/clippy_dev/Cargo.toml b/clippy_dev/Cargo.toml index e2e946d06f2..de56e4b05c9 100644 --- a/clippy_dev/Cargo.toml +++ b/clippy_dev/Cargo.toml @@ -11,3 +11,5 @@ regex = "1" lazy_static = "1.0" shell-escape = "0.1" walkdir = "2" +# FIXME: remove this once cargo issue #7475 is fixed +home = "0.5" diff --git a/clippy_dev/src/fmt.rs b/clippy_dev/src/fmt.rs index d5d56322f2a..1f4925db1be 100644 --- a/clippy_dev/src/fmt.rs +++ b/clippy_dev/src/fmt.rs @@ -202,7 +202,7 @@ fn project_root() -> Result<PathBuf, CliError> { // Workaround for https://github.com/rust-lang/cargo/issues/7475. // FIXME: replace `&bin_path("command")` with `"command"` once the issue is fixed fn bin_path(bin: &str) -> String { - let mut p = PathBuf::from(std::env::var_os("CARGO_HOME").unwrap()); + let mut p = home::cargo_home().unwrap(); p.push("bin"); p.push(bin); p.display().to_string() |
