fix: implement default config path logic and remove unused variable warning
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -80,13 +80,15 @@ 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 {
|
||||||
match Self::default_config_path() {
|
let default_path = dirs::config_dir()
|
||||||
Ok(path) => path,
|
.map(|mut path| {
|
||||||
Err(e) => {
|
path.push("keep");
|
||||||
debug!("CONFIG: Failed to get default config path: {}", e);
|
path.push("config.yml");
|
||||||
PathBuf::from("~/.config/keep/config.yml")
|
path
|
||||||
}
|
})
|
||||||
}
|
.unwrap_or_else(|| PathBuf::from("~/.config/keep/config.yml"));
|
||||||
|
debug!("CONFIG: Using default config path: {:?}", default_path);
|
||||||
|
default_path
|
||||||
};
|
};
|
||||||
|
|
||||||
debug!("CONFIG: Using config path: {:?}", config_path);
|
debug!("CONFIG: Using config path: {:?}", config_path);
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ pub fn mode_list(
|
|||||||
let mut title_row = row!();
|
let mut title_row = row!();
|
||||||
|
|
||||||
for column in &settings.list_format {
|
for column in &settings.list_format {
|
||||||
let column_type = ColumnType::from_str(&column.name)
|
let _column_type = ColumnType::from_str(&column.name)
|
||||||
.map_err(|_| anyhow!("Unknown column {:?}", column.name))?;
|
.map_err(|_| anyhow!("Unknown column {:?}", column.name))?;
|
||||||
|
|
||||||
title_row.add_cell(Cell::new(&column.label).with_style(Attr::Bold));
|
title_row.add_cell(Cell::new(&column.label).with_style(Attr::Bold));
|
||||||
|
|||||||
Reference in New Issue
Block a user