diff options
author | Jae-Heon Ji <32578710+jaeheonji@users.noreply.github.com> | 2023-06-19 00:18:57 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-19 00:18:57 +0900 |
commit | a35bdb71e61015cac4922556cb5246e0c775ffcd (patch) | |
tree | 4f45dffa30a2aa965f3b8061749e3ec267377e27 /zellij-utils | |
parent | 4102a14e5cd1c606ad11c56b1892155478d33a7f (diff) |
Revert "Fix error loading non-existant themes directory and use default themes as the base when merging (#2411)" (#2562)
This reverts commit 48e75d05596d58cfdb4e959d7cf571c3b4ed5038.
Diffstat (limited to 'zellij-utils')
-rw-r--r-- | zellij-utils/src/setup.rs | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/zellij-utils/src/setup.rs b/zellij-utils/src/setup.rs index 1062b233d..13eb63c0c 100644 --- a/zellij-utils/src/setup.rs +++ b/zellij-utils/src/setup.rs @@ -320,18 +320,13 @@ impl Setup { None => config.options.clone(), }; - config.themes = get_default_themes().merge(config.themes); - - if let Some(Command::Setup(Setup { clean: false, .. })) = &cli_args.command { - let user_theme_dir = config_options.theme_dir.clone().or_else(|| { - get_theme_dir(cli_args.config_dir.clone().or_else(find_default_config_dir)) - // If theme dir is not explicitly specified in config_options, - // only try to use it if it exists. - .filter(|dir| dir.exists()) - }); - if let Some(user_theme_dir) = user_theme_dir { - config.themes = config.themes.merge(Themes::from_dir(user_theme_dir)?); - } + config.themes = config.themes.merge(get_default_themes()); + + let user_theme_dir = config_options.theme_dir.clone().or_else(|| { + get_theme_dir(cli_args.config_dir.clone().or_else(find_default_config_dir)) + }); + if let Some(user_theme_dir) = user_theme_dir { + config.themes = config.themes.merge(Themes::from_dir(user_theme_dir)?); } if let Some(Command::Setup(ref setup)) = &cli_args.command { |