Skip to content

Commit 3abf109

Browse files
Move to the smaller, cargo-team maintained home crate
Signed-off-by: Utkarsh Gupta <[email protected]>
1 parent e01187e commit 3abf109

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

kube-client/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ gzip = ["client", "tower-http/decompression-gzip"]
2525
client = ["config", "__non_core", "hyper", "http-body", "tower", "tower-http", "hyper-timeout", "pin-project", "chrono", "jsonpath_lib", "bytes", "futures", "tokio", "tokio-util", "either"]
2626
jsonpatch = ["kube-core/jsonpatch"]
2727
admission = ["kube-core/admission"]
28-
config = ["__non_core", "pem", "dirs"]
28+
config = ["__non_core", "pem", "home"]
2929

3030
# private feature sets; do not use
3131
__non_core = ["tracing", "serde_yaml", "base64"]
@@ -38,7 +38,7 @@ rustdoc-args = ["--cfg", "docsrs"]
3838
[dependencies]
3939
base64 = { version = "0.20.0", optional = true }
4040
chrono = { version = "0.4.23", optional = true, default-features = false }
41-
dirs = { package = "dirs-next", optional = true, version = "2.0.0" }
41+
home = { version = "0.5.4", optional = true }
4242
serde = { version = "1.0.130", features = ["derive"] }
4343
serde_json = "1.0.68"
4444
serde_yaml = { version = "0.9.19", optional = true }

kube-client/src/config/file_config.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,7 @@ fn ensure_trailing_newline(mut data: Vec<u8>) -> Vec<u8> {
555555

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

562561
#[cfg(test)]

0 commit comments

Comments
 (0)