Revert "Fix error loading non-existant themes directory and use default themes as the base when merging (#2411)" (#2562)
This reverts commit 48e75d0559.
This commit is contained in:
parent
4102a14e5c
commit
a35bdb71e6
1 changed files with 6 additions and 11 deletions
|
|
@ -320,19 +320,14 @@ impl Setup {
|
|||
None => config.options.clone(),
|
||||
};
|
||||
|
||||
config.themes = get_default_themes().merge(config.themes);
|
||||
config.themes = config.themes.merge(get_default_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)?);
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(Command::Setup(ref setup)) = &cli_args.command {
|
||||
setup
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue