File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -471,18 +471,29 @@ function Install-TreeSitter {
471471 [switch ]$UseCFS
472472 )
473473
474+ begin {
475+ $arguments = @ (
476+ ' install' ,
477+ ' tree-sitter-cli' ,
478+ ' --version' , ' 0.25.10'
479+ )
480+
481+ if ($UseCFS ) {
482+ $arguments += ' --config'
483+ $arguments += ' .cargo/config.toml'
484+ }
485+ }
486+
474487 process {
475488 if (Test-CommandAvailable - Name ' tree-sitter' ) {
476489 Write-Verbose " tree-sitter already installed."
477490 return
478491 }
479492
480493 Write-Verbose - Verbose " tree-sitter not found, installing..."
481- if ($UseCFS ) {
482- cargo install tree- sitter- cli -- config .cargo/ config.toml
483- } else {
484- cargo install tree- sitter- cli
485- }
494+
495+ cargo @arguments
496+
486497 if ($LASTEXITCODE -ne 0 ) {
487498 throw " Failed to install tree-sitter-cli"
488499 }
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ use std::str::Utf8Error;
66
77use indicatif:: style:: TemplateError ;
88use thiserror:: Error ;
9- use tracing:: error;
109use tree_sitter:: LanguageError ;
1110
1211#[ derive( Error , Debug ) ]
You can’t perform that action at this time.
0 commit comments