Merge pull request #1186 from ahlinc/feat/debug-env-var
feat(cli): Set TREE_SITTER_DEBUG env var on 'tree-sitter parse -d'
This commit is contained in:
commit
23fdbf0e72
1 changed files with 5 additions and 0 deletions
|
|
@ -282,6 +282,11 @@ fn run() -> Result<()> {
|
|||
.map_or(Vec::new(), |e| e.collect());
|
||||
let cancellation_flag = util::cancel_on_stdin();
|
||||
|
||||
if debug {
|
||||
// For augmenting debug logging in external scanners
|
||||
env::set_var("TREE_SITTER_DEBUG", "1");
|
||||
}
|
||||
|
||||
let timeout = matches
|
||||
.value_of("timeout")
|
||||
.map_or(0, |t| u64::from_str_radix(t, 10).unwrap());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue