feat: replace dirs crate with home::home_dir for config path resolution
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -80,13 +80,14 @@ impl Settings {
|
|||||||
} else if let Ok(env_config) = std::env::var("KEEP_CONFIG") {
|
} else if let Ok(env_config) = std::env::var("KEEP_CONFIG") {
|
||||||
PathBuf::from(env_config)
|
PathBuf::from(env_config)
|
||||||
} else {
|
} else {
|
||||||
let default_path = dirs::config_dir()
|
let default_path = if let Some(mut config_dir) = home::home_dir() {
|
||||||
.map(|mut path| {
|
config_dir.push(".config");
|
||||||
path.push("keep");
|
config_dir.push("keep");
|
||||||
path.push("config.yml");
|
config_dir.push("config.yml");
|
||||||
path
|
config_dir
|
||||||
})
|
} else {
|
||||||
.unwrap_or_else(|| PathBuf::from("~/.config/keep/config.yml"));
|
PathBuf::from("~/.config/keep/config.yml")
|
||||||
|
};
|
||||||
debug!("CONFIG: Using default config path: {:?}", default_path);
|
debug!("CONFIG: Using default config path: {:?}", default_path);
|
||||||
default_path
|
default_path
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user