Skip to content

Commit 40976bf

Browse files
committed
Start work on clippy-fix as subcommand
1 parent 1ff81c1 commit 40976bf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ where
5959
let mut args = vec!["check".to_owned()];
6060

6161
for arg in old_args.by_ref() {
62+
if arg == "--fix" {
63+
args[0] = "fix".to_owned();
64+
continue;
65+
}
66+
6267
if arg == "--" {
6368
break;
6469
}
@@ -96,7 +101,7 @@ where
96101

97102
let exit_status = std::process::Command::new("cargo")
98103
.args(&args)
99-
.env("RUSTC_WRAPPER", path)
104+
.env("RUSTC_WORKSPACE_WRAPPER", path)
100105
.env("CLIPPY_ARGS", clippy_args)
101106
.envs(target_dir)
102107
.spawn()

0 commit comments

Comments
 (0)