diff --git a/kube-client/Cargo.toml b/kube-client/Cargo.toml index 08871fd14..19a8bd3f2 100644 --- a/kube-client/Cargo.toml +++ b/kube-client/Cargo.toml @@ -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"] @@ -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 } diff --git a/kube-client/src/config/file_config.rs b/kube-client/src/config/file_config.rs index 468121faa..dc98b5495 100644 --- a/kube-client/src/config/file_config.rs +++ b/kube-client/src/config/file_config.rs @@ -555,8 +555,7 @@ fn ensure_trailing_newline(mut data: Vec) -> Vec { /// Returns kubeconfig path from `$HOME/.kube/config`. fn default_kube_path() -> Option { - 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)]