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") {
|
||||
PathBuf::from(env_config)
|
||||
} else {
|
||||
let default_path = dirs::config_dir()
|
||||
.map(|mut path| {
|
||||
path.push("keep");
|
||||
path.push("config.yml");
|
||||
path
|
||||
})
|
||||
.unwrap_or_else(|| PathBuf::from("~/.config/keep/config.yml"));
|
||||
let default_path = if let Some(mut config_dir) = home::home_dir() {
|
||||
config_dir.push(".config");
|
||||
config_dir.push("keep");
|
||||
config_dir.push("config.yml");
|
||||
config_dir
|
||||
} else {
|
||||
PathBuf::from("~/.config/keep/config.yml")
|
||||
};
|
||||
debug!("CONFIG: Using default config path: {:?}", default_path);
|
||||
default_path
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user