diff --git a/Cargo.lock b/Cargo.lock index 4b7234b2f6..75d5beda6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -975,8 +975,9 @@ dependencies = [ [[package]] name = "home" -version = "0.5.3" -source = "git+https://github.com/rbtcollins/home?rev=a243ee2fbee6022c57d56f5aa79aefe194eabe53#a243ee2fbee6022c57d56f5aa79aefe194eabe53" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "747309b4b440c06d57b0b25f2aee03ee9b5e5397d288c60e21fc709bb98a7408" dependencies = [ "winapi", ] diff --git a/Cargo.toml b/Cargo.toml index 339dce1f7f..8fdd71f173 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ effective-limits = "0.5.3" enum-map = "2.0.3" flate2 = "1" git-testament = "0.2" -home = {git = "https://github.com/rbtcollins/home", rev = "a243ee2fbee6022c57d56f5aa79aefe194eabe53"} +home = "0.5.4" lazy_static = "1" libc = "0.2" num_cpus = "1.13" @@ -127,3 +127,4 @@ lto = true # Reduce build time by setting proc-macro crates non optimized. [profile.release.build-override] opt-level = 0 + diff --git a/src/currentprocess.rs b/src/currentprocess.rs index f4cea4b9bc..392824b0a1 100644 --- a/src/currentprocess.rs +++ b/src/currentprocess.rs @@ -9,6 +9,7 @@ use std::path::{Path, PathBuf}; use std::sync::Once; use std::sync::{Arc, Mutex}; +use home::env as home; use rand::{thread_rng, Rng}; pub(crate) mod argsource; diff --git a/src/currentprocess/homethunk.rs b/src/currentprocess/homethunk.rs index 36077e31c5..1c065d0992 100644 --- a/src/currentprocess/homethunk.rs +++ b/src/currentprocess/homethunk.rs @@ -4,6 +4,8 @@ use std::io; use std::ops::Deref; use std::path::PathBuf; +use home::env as home; + use super::CurrentDirSource; use super::HomeProcess; use super::OSProcess; diff --git a/src/utils/utils.rs b/src/utils/utils.rs index 0362372b5e..873284db41 100644 --- a/src/utils/utils.rs +++ b/src/utils/utils.rs @@ -5,6 +5,7 @@ use std::io::{self, BufReader, Write}; use std::path::{Path, PathBuf}; use anyhow::{anyhow, bail, Context, Result}; +use home::env as home; use retry::delay::{jitter, Fibonacci}; use retry::{retry, OperationResult}; use sha2::Sha256; @@ -493,11 +494,11 @@ pub(crate) fn to_absolute>(path: P) -> Result { } pub(crate) fn home_dir() -> Option { - home::home_dir_from(&home_process()) + home::home_dir_with_env(&home_process()) } pub(crate) fn cargo_home() -> Result { - home::cargo_home_from(&home_process()).context("failed to determine cargo home") + home::cargo_home_with_env(&home_process()).context("failed to determine cargo home") } // Creates a ~/.rustup folder @@ -524,7 +525,7 @@ fn rustup_home_in_user_dir() -> Result { } pub(crate) fn rustup_home() -> Result { - home::rustup_home_from(&home_process()).context("failed to determine rustup home dir") + home::rustup_home_with_env(&home_process()).context("failed to determine rustup home dir") } pub(crate) fn format_path_for_display(path: &str) -> String {