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:
Patrick Thomson 2020-10-05 16:14:09 -04:00 committed by GitHub
commit b9b478873a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}