Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions gix-path/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ gix-validate = { version = "^0.10.1", path = "../gix-validate" }
bstr = { version = "1.12.0", default-features = false, features = ["std"] }
thiserror = "2.0.17"

[target.'cfg(not(target_family = "wasm"))'.dependencies]
home = "0.5.5"

[dev-dependencies]
gix-testtools = { path = "../tests/tools" }
serial_test = { version = "3.1.0", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions gix-path/src/env/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,15 @@ pub fn home_dir() -> Option<PathBuf> {
}

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

/// Returns the contents of an environment variable of `name` with some special handling for
Expand Down
Loading