Skip to content

Commit

Permalink
Alert the user that the custom theme was not used and why
Browse files Browse the repository at this point in the history
  • Loading branch information
riquito committed Nov 5, 2023
1 parent 89659e4 commit dd44bdc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ impl Colors {
ThemeOption::Default | ThemeOption::NoLscolors => Some(Theme::default().color),
ThemeOption::Custom => Some(
Theme::from_path::<ColorTheme>(Path::new("colors").to_str().unwrap())
.unwrap_or_default(),
.unwrap_or_else(|e| {
print_output!("Warning: cannot load custom theme. {}.\n\n", e);
ColorTheme::default()
}),
),
ThemeOption::CustomLegacy(ref file) => {
print_output!(
Expand Down

0 comments on commit dd44bdc

Please sign in to comment.