Skip to content

Commit 732feb8

Browse files
authored
Merge pull request #3073 from LucioFranco/lucio/home-update
Update home usage to new env fn
2 parents b0adb0c + f784552 commit 732feb8

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

Diff for: Cargo.lock

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ effective-limits = "0.5.3"
3535
enum-map = "2.0.3"
3636
flate2 = "1"
3737
git-testament = "0.2"
38-
home = {git = "https://github.com/rbtcollins/home", rev = "a243ee2fbee6022c57d56f5aa79aefe194eabe53"}
38+
home = "0.5.4"
3939
lazy_static = "1"
4040
libc = "0.2"
4141
num_cpus = "1.13"
@@ -127,3 +127,4 @@ lto = true
127127
# Reduce build time by setting proc-macro crates non optimized.
128128
[profile.release.build-override]
129129
opt-level = 0
130+

Diff for: src/currentprocess.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use std::path::{Path, PathBuf};
99
use std::sync::Once;
1010
use std::sync::{Arc, Mutex};
1111

12+
use home::env as home;
1213
use rand::{thread_rng, Rng};
1314

1415
pub(crate) mod argsource;

Diff for: src/currentprocess/homethunk.rs

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ use std::io;
44
use std::ops::Deref;
55
use std::path::PathBuf;
66

7+
use home::env as home;
8+
79
use super::CurrentDirSource;
810
use super::HomeProcess;
911
use super::OSProcess;

Diff for: src/utils/utils.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::io::{self, BufReader, Write};
55
use std::path::{Path, PathBuf};
66

77
use anyhow::{anyhow, bail, Context, Result};
8+
use home::env as home;
89
use retry::delay::{jitter, Fibonacci};
910
use retry::{retry, OperationResult};
1011
use sha2::Sha256;
@@ -493,11 +494,11 @@ pub(crate) fn to_absolute<P: AsRef<Path>>(path: P) -> Result<PathBuf> {
493494
}
494495

495496
pub(crate) fn home_dir() -> Option<PathBuf> {
496-
home::home_dir_from(&home_process())
497+
home::home_dir_with_env(&home_process())
497498
}
498499

499500
pub(crate) fn cargo_home() -> Result<PathBuf> {
500-
home::cargo_home_from(&home_process()).context("failed to determine cargo home")
501+
home::cargo_home_with_env(&home_process()).context("failed to determine cargo home")
501502
}
502503

503504
// Creates a ~/.rustup folder
@@ -524,7 +525,7 @@ fn rustup_home_in_user_dir() -> Result<PathBuf> {
524525
}
525526

526527
pub(crate) fn rustup_home() -> Result<PathBuf> {
527-
home::rustup_home_from(&home_process()).context("failed to determine rustup home dir")
528+
home::rustup_home_with_env(&home_process()).context("failed to determine rustup home dir")
528529
}
529530

530531
pub(crate) fn format_path_for_display(path: &str) -> String {

0 commit comments

Comments
 (0)