Skip to content

Commit cbb73ea

Browse files
authored
Merge pull request #2235 from GitoxideLabs/home
fix: use `std::env::home_dir()` and remove the `home` crate from dependencies. (#2234)
2 parents 409708f + 77e485d commit cbb73ea

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

Cargo.lock

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gix-path/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ gix-validate = { version = "^0.10.1", path = "../gix-validate" }
2020
bstr = { version = "1.12.0", default-features = false, features = ["std"] }
2121
thiserror = "2.0.17"
2222

23-
[target.'cfg(not(target_family = "wasm"))'.dependencies]
24-
home = "0.5.5"
25-
2623
[dev-dependencies]
2724
gix-testtools = { path = "../tests/tools" }
2825
serial_test = { version = "3.1.0", default-features = false }

gix-path/src/env/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,15 @@ pub fn home_dir() -> Option<PathBuf> {
199199
}
200200

201201
/// Tries to obtain the home directory from `HOME` on all platforms, but falls back to
202-
/// [`home::home_dir()`] for more complex ways of obtaining a home directory, particularly useful
202+
/// [`std::env::home_dir()`] for more complex ways of obtaining a home directory, particularly useful
203203
/// on Windows.
204204
///
205205
/// The reason `HOME` is tried first is to allow Windows users to have a custom location for their
206206
/// linux-style home, as otherwise they would have to accumulate dot files in a directory these are
207207
/// inconvenient and perceived as clutter.
208208
#[cfg(not(target_family = "wasm"))]
209209
pub fn home_dir() -> Option<PathBuf> {
210-
std::env::var_os("HOME").map(Into::into).or_else(home::home_dir)
210+
std::env::var_os("HOME").map(Into::into).or_else(std::env::home_dir)
211211
}
212212

213213
/// Returns the contents of an environment variable of `name` with some special handling for

0 commit comments

Comments
 (0)