mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-01 02:19:16 +01:00
Merge pull request #3179 from dtolnay-contrib/vendorbug
Work around `cargo vendor` losing syntax_mapping builtins directory
This commit is contained in:
commit
498df11a50
@ -7,6 +7,8 @@
|
|||||||
|
|
||||||
## Other
|
## Other
|
||||||
|
|
||||||
|
- Work around build failures when building `bat` from vendored sources #3179 (@dtolnay)
|
||||||
|
|
||||||
## Syntaxes
|
## Syntaxes
|
||||||
|
|
||||||
## Themes
|
## Themes
|
||||||
|
@ -236,8 +236,14 @@ fn get_def_paths() -> anyhow::Result<Vec<PathBuf>> {
|
|||||||
];
|
];
|
||||||
|
|
||||||
let mut toml_paths = vec![];
|
let mut toml_paths = vec![];
|
||||||
for subdir in source_subdirs {
|
for subdir_name in source_subdirs {
|
||||||
let wd = WalkDir::new(Path::new("src/syntax_mapping/builtins").join(subdir));
|
let subdir = Path::new("src/syntax_mapping/builtins").join(subdir_name);
|
||||||
|
if !subdir.try_exists()? {
|
||||||
|
// Directory might not exist due to this `cargo vendor` bug:
|
||||||
|
// https://github.com/rust-lang/cargo/issues/15080
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
let wd = WalkDir::new(subdir);
|
||||||
let paths = wd
|
let paths = wd
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map_ok(|entry| {
|
.filter_map_ok(|entry| {
|
||||||
|
Loading…
Reference in New Issue
Block a user