Merge pull request #1321 from ahlinc/fix/generate-path-arg

fix(cli): Remove tree-sitter grammar ./... call limitation
This commit is contained in:
Andrew Hlynskyi 2021-08-06 02:43:21 +03:00 committed by GitHub
commit fb6bd2cad3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,6 +169,7 @@ fn load_grammar_file(grammar_path: &Path) -> Result<String> {
}
fn load_js_grammar_file(grammar_path: &Path) -> Result<String> {
let grammar_path = fs::canonicalize(grammar_path)?;
let mut node_process = Command::new("node")
.env("TREE_SITTER_GRAMMAR_PATH", grammar_path)
.stdin(Stdio::piped())