@@ -53,6 +53,7 @@ pub fn check(
5353 librustdoc_path : & Path ,
5454 tools_path : & Path ,
5555 npm : & Path ,
56+ cargo : & Path ,
5657 bless : bool ,
5758 extra_checks : Option < & str > ,
5859 pos_args : & [ String ] ,
@@ -65,6 +66,7 @@ pub fn check(
6566 librustdoc_path,
6667 tools_path,
6768 npm,
69+ cargo,
6870 bless,
6971 extra_checks,
7072 pos_args,
@@ -80,6 +82,7 @@ fn check_impl(
8082 librustdoc_path : & Path ,
8183 tools_path : & Path ,
8284 npm : & Path ,
85+ cargo : & Path ,
8386 bless : bool ,
8487 extra_checks : Option < & str > ,
8588 pos_args : & [ String ] ,
@@ -295,7 +298,7 @@ fn check_impl(
295298 } else {
296299 eprintln ! ( "spellcheck files" ) ;
297300 }
298- spellcheck_runner ( & outdir, & args) ?;
301+ spellcheck_runner ( & outdir, & cargo , & args) ?;
299302 }
300303
301304 if js_lint || js_typecheck {
@@ -579,8 +582,8 @@ fn shellcheck_runner(args: &[&OsStr]) -> Result<(), Error> {
579582}
580583
581584/// Check that spellchecker is installed then run it at the given path
582- fn spellcheck_runner ( outdir : & Path , args : & [ & str ] ) -> Result < ( ) , Error > {
583- let bin_path = ensure_version_or_cargo_install ( outdir, "typos-cli" , "typos" , "1.34.0" ) ?;
585+ fn spellcheck_runner ( outdir : & Path , cargo : & Path , args : & [ & str ] ) -> Result < ( ) , Error > {
586+ let bin_path = ensure_version_or_cargo_install ( outdir, cargo , "typos-cli" , "typos" , "1.34.0" ) ?;
584587
585588 match Command :: new ( bin_path) . args ( args) . status ( ) {
586589 Ok ( status) => {
0 commit comments