mirror of
https://github.com/sharkdp/bat.git
synced 2024-12-23 06:48:53 +01:00
Handle syntax-set loading errors
This commit is contained in:
parent
39e2971e96
commit
a348a9f68e
@ -43,7 +43,7 @@ impl HighlightingAssets {
|
||||
syntax_dir.to_string_lossy()
|
||||
).into());
|
||||
}
|
||||
let _ = syntax_set.load_syntaxes(syntax_dir, true);
|
||||
syntax_set.load_syntaxes(syntax_dir, true)?;
|
||||
syntax_set.load_plain_text_syntax();
|
||||
|
||||
Ok(HighlightingAssets {
|
||||
|
@ -40,6 +40,7 @@ mod errors {
|
||||
foreign_links {
|
||||
Clap(::clap::Error);
|
||||
Io(::std::io::Error);
|
||||
SyntectError(::syntect::LoadingError);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user