@@ -53,6 +53,7 @@ pub fn check(
53
53
librustdoc_path : & Path ,
54
54
tools_path : & Path ,
55
55
npm : & Path ,
56
+ cargo : & Path ,
56
57
bless : bool ,
57
58
extra_checks : Option < & str > ,
58
59
pos_args : & [ String ] ,
@@ -65,6 +66,7 @@ pub fn check(
65
66
librustdoc_path,
66
67
tools_path,
67
68
npm,
69
+ cargo,
68
70
bless,
69
71
extra_checks,
70
72
pos_args,
@@ -80,6 +82,7 @@ fn check_impl(
80
82
librustdoc_path : & Path ,
81
83
tools_path : & Path ,
82
84
npm : & Path ,
85
+ cargo : & Path ,
83
86
bless : bool ,
84
87
extra_checks : Option < & str > ,
85
88
pos_args : & [ String ] ,
@@ -295,7 +298,7 @@ fn check_impl(
295
298
} else {
296
299
eprintln ! ( "spellcheck files" ) ;
297
300
}
298
- spellcheck_runner ( & outdir, & args) ?;
301
+ spellcheck_runner ( & outdir, & cargo , & args) ?;
299
302
}
300
303
301
304
if js_lint || js_typecheck {
@@ -579,8 +582,8 @@ fn shellcheck_runner(args: &[&OsStr]) -> Result<(), Error> {
579
582
}
580
583
581
584
/// 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" ) ?;
584
587
585
588
match Command :: new ( bin_path) . args ( args) . status ( ) {
586
589
Ok ( status) => {
0 commit comments