Use home::cargo_home
This commit is contained in:
parent
20b7351439
commit
248251b3b2
|
@ -11,3 +11,5 @@ regex = "1"
|
||||||
lazy_static = "1.0"
|
lazy_static = "1.0"
|
||||||
shell-escape = "0.1"
|
shell-escape = "0.1"
|
||||||
walkdir = "2"
|
walkdir = "2"
|
||||||
|
# FIXME: remove this once cargo issue #7475 is fixed
|
||||||
|
home = "0.5"
|
||||||
|
|
|
@ -202,7 +202,7 @@ fn project_root() -> Result<PathBuf, CliError> {
|
||||||
// Workaround for https://github.com/rust-lang/cargo/issues/7475.
|
// Workaround for https://github.com/rust-lang/cargo/issues/7475.
|
||||||
// FIXME: replace `&bin_path("command")` with `"command"` once the issue is fixed
|
// FIXME: replace `&bin_path("command")` with `"command"` once the issue is fixed
|
||||||
fn bin_path(bin: &str) -> String {
|
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.push(bin);
|
p.push(bin);
|
||||||
p.display().to_string()
|
p.display().to_string()
|
||||||
|
|
Loading…
Reference in a new issue