Skip to content

Commit 23ce370

Browse files
author
sogaiu
committed
cli: Stop config.json search sooner if TREE_SITTER_DIR set
1 parent adeb8d0 commit 23ce370

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cli/config/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ impl Config {
2525
if let Ok(path) = env::var("TREE_SITTER_DIR") {
2626
let mut path = PathBuf::from(path);
2727
path.push("config.json");
28+
if !path.exists() {
29+
return Ok(None);
30+
}
2831
if path.is_file() {
2932
return Ok(Some(path));
3033
}

0 commit comments

Comments
 (0)