cli: Stop config.json search sooner if TREE_SITTER_DIR set
This commit is contained in:
parent
adeb8d0aa9
commit
23ce370fa3
1 changed files with 3 additions and 0 deletions
|
|
@ -25,6 +25,9 @@ impl Config {
|
|||
if let Ok(path) = env::var("TREE_SITTER_DIR") {
|
||||
let mut path = PathBuf::from(path);
|
||||
path.push("config.json");
|
||||
if !path.exists() {
|
||||
return Ok(None);
|
||||
}
|
||||
if path.is_file() {
|
||||
return Ok(Some(path));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue