Merge pull request #2020 from tree-sitter/tree-sitter-debug-in-test

Add setting TREE_SITTER_DEBUG in the test sub command
This commit is contained in:
Andrew Hlynskyi 2023-01-10 12:17:33 +02:00 committed by GitHub
commit 2949b210b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -329,6 +329,11 @@ fn run() -> Result<()> {
let update = matches.is_present("update");
let filter = matches.value_of("filter");
if debug {
// For augmenting debug logging in external scanners
env::set_var("TREE_SITTER_DEBUG", "1");
}
loader.use_debug_build(debug_build);
let languages = loader.languages_at_path(&current_dir)?;