Merge pull request #748 from tree-sitter/fix-nonexistent-file-crash
Fix crash when nonexistent files were passed to `parse`.
This commit is contained in:
commit
b9b478873a
1 changed files with 4 additions and 0 deletions
|
|
@ -426,6 +426,10 @@ fn collect_paths<'a>(
|
|||
}
|
||||
}
|
||||
|
||||
if result.is_empty() {
|
||||
Error::err("No files were found at or matched by the provided pathname/glob".to_string())?;
|
||||
}
|
||||
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue