mirror of
https://github.com/sharkdp/bat.git
synced 2024-12-23 14:58:49 +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()
|
syntax_dir.to_string_lossy()
|
||||||
).into());
|
).into());
|
||||||
}
|
}
|
||||||
let _ = syntax_set.load_syntaxes(syntax_dir, true);
|
syntax_set.load_syntaxes(syntax_dir, true)?;
|
||||||
syntax_set.load_plain_text_syntax();
|
syntax_set.load_plain_text_syntax();
|
||||||
|
|
||||||
Ok(HighlightingAssets {
|
Ok(HighlightingAssets {
|
||||||
|
@ -40,6 +40,7 @@ mod errors {
|
|||||||
foreign_links {
|
foreign_links {
|
||||||
Clap(::clap::Error);
|
Clap(::clap::Error);
|
||||||
Io(::std::io::Error);
|
Io(::std::io::Error);
|
||||||
|
SyntectError(::syntect::LoadingError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user