fix(loader): don't print warnings if the file is not found
This commit is contained in:
parent
d73b66cbbc
commit
18e4a2405b
1 changed files with 10 additions and 4 deletions
|
|
@ -1217,10 +1217,16 @@ impl Loader {
|
|||
}
|
||||
}
|
||||
} else if let Err(e) = ts_json {
|
||||
eprintln!(
|
||||
"Warning: Failed to read {} -- {e}",
|
||||
parser_path.join("tree-sitter.json").display()
|
||||
);
|
||||
match e.downcast_ref::<std::io::Error>() {
|
||||
// This is noisy, and not really an issue.
|
||||
Some(e) if e.kind() == std::io::ErrorKind::NotFound => {}
|
||||
_ => {
|
||||
eprintln!(
|
||||
"Warning: Failed to parse {} -- {e}",
|
||||
parser_path.join("tree-sitter.json").display()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we didn't find any language configurations in the tree-sitter.json file,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue