Skip to content

Commit

Permalink
Swap dirs-next dependency to cargo-team maintained home crate (#1207
Browse files Browse the repository at this point in the history
)

Move to the smaller, cargo-team maintained `home` crate

Signed-off-by: Utkarsh Gupta <[email protected]>
Co-authored-by: Eirik A <[email protected]>
  • Loading branch information
utkarshgupta137 and clux authored Jul 20, 2023
1 parent 20a6f2e commit e6eba5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions kube-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gzip = ["client", "tower-http/decompression-gzip"]
client = ["config", "__non_core", "hyper", "http-body", "tower", "tower-http", "hyper-timeout", "pin-project", "chrono", "jsonpath_lib", "bytes", "futures", "tokio", "tokio-util", "either"]
jsonpatch = ["kube-core/jsonpatch"]
admission = ["kube-core/admission"]
config = ["__non_core", "pem", "dirs"]
config = ["__non_core", "pem", "home"]

# private feature sets; do not use
__non_core = ["tracing", "serde_yaml", "base64"]
Expand All @@ -39,7 +39,7 @@ rustdoc-args = ["--cfg", "docsrs"]
[dependencies]
base64 = { version = "0.20.0", optional = true }
chrono = { version = "0.4.23", optional = true, default-features = false }
dirs = { package = "dirs-next", optional = true, version = "2.0.0" }
home = { version = "0.5.4", optional = true }
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1.0.68"
serde_yaml = { version = "0.9.19", optional = true }
Expand Down
3 changes: 1 addition & 2 deletions kube-client/src/config/file_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,7 @@ fn ensure_trailing_newline(mut data: Vec<u8>) -> Vec<u8> {

/// Returns kubeconfig path from `$HOME/.kube/config`.
fn default_kube_path() -> Option<PathBuf> {
use dirs::home_dir;
home_dir().map(|h| h.join(".kube").join("config"))
home::home_dir().map(|h| h.join(".kube").join("config"))
}

#[cfg(test)]
Expand Down

0 comments on commit e6eba5d

Please sign in to comment.