fix: match logic of theme directory with settings directory, so ATUIN_CONFIG_DIR is respected (#2707)

This commit is contained in:
P T Weir
2025-08-04 13:48:21 +01:00
committed by GitHub
parent 515dd191e2
commit c21cd16d4d

View File

@@ -376,8 +376,13 @@ impl ThemeManager {
PathBuf::from(p)
} else {
let config_dir = atuin_common::utils::config_dir();
let mut theme_file = PathBuf::new();
theme_file.push(config_dir);
let mut theme_file = if let Ok(p) = std::env::var("ATUIN_CONFIG_DIR") {
PathBuf::from(p)
} else {
let mut theme_file = PathBuf::new();
theme_file.push(config_dir);
theme_file
};
theme_file.push("themes");
theme_file
};