Skip to content

Commit dd44bdc

Browse files
committed
Alert the user that the custom theme was not used and why
1 parent 89659e4 commit dd44bdc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/color.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ impl Colors {
176176
ThemeOption::Default | ThemeOption::NoLscolors => Some(Theme::default().color),
177177
ThemeOption::Custom => Some(
178178
Theme::from_path::<ColorTheme>(Path::new("colors").to_str().unwrap())
179-
.unwrap_or_default(),
179+
.unwrap_or_else(|e| {
180+
print_output!("Warning: cannot load custom theme. {}.\n\n", e);
181+
ColorTheme::default()
182+
}),
180183
),
181184
ThemeOption::CustomLegacy(ref file) => {
182185
print_output!(

0 commit comments

Comments
 (0)