aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-client/src/theme.rs
diff options
context:
space:
mode:
authorP T Weir <phil.weir@flaxandteal.co.uk>2025-08-04 13:48:21 +0100
committerGitHub <noreply@github.com>2025-08-04 14:48:21 +0200
commitc21cd16d4df9e35a2a918d1480bef611faf93a14 (patch)
tree1dce14fd4cb0fbb4cddb3ab34c6328c5c8bec052 /crates/atuin-client/src/theme.rs
parentfix: Make status exit 1 if not logged in (#2843) (diff)
downloadatuin-c21cd16d4df9e35a2a918d1480bef611faf93a14.zip
fix: match logic of theme directory with settings directory, so ATUIN_CONFIG_DIR is respected (#2707)
Diffstat (limited to 'crates/atuin-client/src/theme.rs')
-rw-r--r--crates/atuin-client/src/theme.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/atuin-client/src/theme.rs b/crates/atuin-client/src/theme.rs
index b53c2e7a..1d4202b5 100644
--- a/crates/atuin-client/src/theme.rs
+++ b/crates/atuin-client/src/theme.rs
@@ -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
};