on master help sign in
Print themes directory in error message if no themes could be loaded from it.

Before this patch: $ bat cache --init [bat error]: Could not load themes from '{}' After: $ bat cache --init [bat error]: Could not load themes from '/home/user/.config/bat/themes'

commit65bb4c7ee6833913596bcf9da04953681b2077c3 authorGert Hulselmans <gert.hulselmans@kuleuven.vib.be> dateWed 23 May 2018, 11:31 (8 years ago) parent556149a
1 file changed+6−2
src/assets.rs+6−2
src/assets.rs+6−2
@@ -29,8 +29,12 @@ impl HighlightingAssets {
2929 let source_dir = dir.unwrap_or_else(|| PROJECT_DIRS.config_dir());
3030
3131 let theme_dir = source_dir.join("themes");
32− let theme_set =
33− ThemeSet::load_from_folder(&theme_dir).chain_err(|| "Could not load themes from '{}'")?;
32+ let theme_set = ThemeSet::load_from_folder(&theme_dir).chain_err(|| {
33+ format!(
34+ "Could not load themes from '{}'",
35+ theme_dir.to_string_lossy()
36+ )
37+ })?;
3438 let mut syntax_set = SyntaxSet::new();
3539 let syntax_dir = source_dir.join("syntaxes");
3640 if !syntax_dir.exists() {